home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / ast_comp / concurre.tar / concurrency / man.tex (.txt) < prev    next >
LaTeX Document  |  1993-07-05  |  130KB  |  2,329 lines

  1. % -*- Latex -*-
  2. \documentstyle[11pt]{article}
  3. %\pagestyle{empty}
  4. \headheight 0pt
  5. \headsep 0pt
  6. \textheight 652.4pt
  7. \topmargin 0pt
  8. \long\def\comment#1{}
  9. \newenvironment{definition}{\par\medskip\addtocounter{theorem}{1}%
  10.   \noindent{\bf Definition \arabic{theorem}}\quad
  11.   }{\hfill\qed\quad\medskip}
  12. \def\A{{\bf\mbox{$\cal A$}}}
  13. \def\B{{\bf\mbox{$\cal B$}}}
  14. \def\C{{\bf\mbox{$\cal C$}}}
  15. \def\D{{\bf\mbox{$\cal D$}}}
  16. \def\E{{\bf\mbox{$\cal E$}}}
  17. \def\I{{\bf\mbox{$\cal I$}}}
  18. \def\T{{\bf\mbox{$\cal T$}}}
  19. \def\X{{\bf\mbox{$\cal X$}}}
  20. \def\Y{{\bf\mbox{$\cal Y$}}}
  21. \def\one{{\bf 1}}
  22. \def\two{{\bf 2}}
  23. \def\three{{\bf 3}}
  24. %\def\R{{\mbox{${\bf\bar R}_+$}}}
  25. \def\R{{\bf R}}
  26. \def\Rdp{{\bf R}^{\tt d}}
  27. \def\N{{\mbox{\bf N}}}
  28. \def\Set{{\bf Set}}
  29. \def\SET{{\bf SET}}
  30. \def\SSM{{\bf COSMON}}
  31. \def\Seti{{\bf Seti}}
  32. \def\Pos{{\bf Pos}}
  33. \def\Pom{{\bf Pom}}
  34. \def\Pros{{\bf Pros}}
  35. \def\Prom{{\bf Prom}}
  36. \def\Pomi{{\bf Pomi}}
  37. \def\Cat{{\bf Cat}}
  38. \def\CAT{{\bf CAT}}
  39. \def\Grph{{\bf Grph}}
  40. \def\Hom{{\rm Hom}}
  41. \def\op{^{\rm op}}
  42. \def\ob{{\rm ob}}
  43. \def\min{{\rm min}}
  44. \def\max{{\rm max}}
  45. \def\SR{{\mathord{\bf SR}}}
  46. %\def\DC{\D{\mbox -}\Cat}
  47. %\def\DpC{\D'{\mbox -}\Cat}
  48. \def\Z2{{\mbox{\bf Z$_2$}}}
  49. \def\DYN{{\mbox{\bf DYN}}}
  50. \def\TMP{{\mbox{\bf TMP}}}
  51. \def\d{\delta}
  52. \def\comma{\mathop{\rhd}}
  53. \def\lc{\underline{;}}
  54. \def\ll{\underline{\lambda}}
  55. \def\darrow{\mathop{\downarrow}} % let's flush this, ok?
  56. \def\vertex{\mathop{\rm vert}}
  57. \def\
  58. #1{\stackrel{#1}{\longrightarrow}}
  59. \let\
  60. =\darrow
  61. \def\<#1>{\langle #1 \rangle}
  62. \def\eqalign#1{\vbox{\halign{\hfil$##$&$\quad##$\hfil\cr #1}}}
  63. \def\congh{\raise0.5ex\hbox{$\smash\cong$}}
  64. \def\UV{U\
  65. \def\Tau{T}
  66. \def\qed{\vrule height6pt width4pt depth0pt} % end-of-proof etc.
  67. \mathcode`\:="603A
  68. \newtheorem{theorem}{Theorem}
  69. \newtheorem{corollary}[theorem]{Corollary}
  70. \newtheorem{lemma}[theorem]{Lemma}
  71. \newtheorem{proposition}[theorem]{Proposition}
  72. \newenvironment{proof}{\medskip\noindent{\it Proof}:\quad}{\quad\qed\medskip}
  73. \newenvironment{proofo}{\medskip\noindent{\it Outline of Proof}:\quad}{\quad\qed\medskip}
  74. %%======================================================================%
  75. %%    TeX  macros for drawing rectangular category-theory diagrams    %
  76. %%                                    %
  77. %%            Paul   Taylor                    %
  78. %%                                    %
  79. %%    Department of Computing, Imperial College, London SW7 2BZ    %
  80. %%    +44 1 589 5111 x 5057              pt@doc.ic.ac.uk    %
  81. %%                                    %
  82. %%        For user documentation, see "diagram.doc.tex"        %
  83. %%                                    %
  84. %%    COPYRIGHT NOTICE:                        %
  85. %%    This package may be copied and used freely for any academic    %
  86. %%    (not commercial or military) purpose, on condition that it    %
  87. %%    is not altered in any way, and that an acknowledgement is     %
  88. %%    included in any published paper using it.            %
  89. %%                                    %
  90. %%======================================================================%
  91. \message{<Paul Taylor's commutative diagrams, 20 December 1989>} \let\then
  92. \relax\font\tenln=line10 \newdimen\zpt\zpt=0pt \def\tozpt{to \zpt}
  93. \mathchardef\lt="313C \mathchardef\gt="313E
  94. \newif\ifincommdiag\incommdiagfalse
  95. \def\diagram{\bgroup\incommdiagtrue\null\baselineskip3.8ex \lineskip\zpt
  96. \lineskiplimit\zpt\mathsurround\zpt\tabskip\zpt\let\\\cr\,\vcenter\bgroup
  97. \halign\bgroup\hfil$##$\hfil&&\hfil$##$\hfil\cr\mathstrut\cr}
  98. \def\enddiagram{\crcr\mathstrut\crcr\egroup\horizreformatmatrix\egroup\,%
  99. \egroup}
  100. \def\commdiag#1{{\diagram#1\enddiagram}}
  101. \def\across#1{\span\omit\mscount=#1 \loop\ifnum\mscount>2 \spAn\repeat
  102. \ignorespaces} \def\spAn{\relax\span\omit\advance\mscount by -1}
  103. \def\horizreformatmatrix{\bombparameters\skip7=\zpt\setbox8=\vbox{}\loop
  104. \setbox9=\lastbox\ifhbox9 \horizreformatrow\setbox8=\vbox{\box9\vskip\skip7%
  105. \unvbox8}\skip7=\lastskip\unskip\repeat\vskip\skip7 \unvbox8 }
  106. \def\horizreformatrow{\setbox9=\hbox{\unhbox9\setbox5=\box9\spanspace\zpt
  107. \prevspace\zpt\skip9=\lastskip\unskip\setbox6=\hbox{}\loop\setbox7=\lastbox
  108. \ifhbox7\setbox0=\hbox{\unhcopy7}\hsize=.5\wd0 \ourspace=.5\wd7 \advance
  109. \ourspace-.5\wd0 \horizreformatcell\skip8=\lastskip\unskip\repeat\hskip\skip8%
  110. \ifhbox5\box5\fi\unhbox6}}
  111. \def\bombparameters{\parfillskip\zpt minus10\hsize\linepenalty9000\parskip
  112. \zpt\parindent\zpt\everypar{}\pretolerance10000 \tolerance10000 \hyphenpenalty
  113. 10000 \exhyphenpenalty10000 \adjdemerits0 \doublehyphendemerits0
  114. \finalhyphendemerits0 \leftskip\zpt\rightskip\zpt\looseness0 \hfuzz10\hsize}
  115. \def\addtobomblist{\global\setbox6=\hbox{\box7\hskip\skip8\ifhbox5\ifdim
  116. \ourspace=\zpt\then\box5\else\hbox to\wd5{\kern-\ourspace\unhbox5}\fi\fi
  117. \unhbox6}}
  118. \newdimen\prevspace\newdimen\ourspace\newdimen\spanspace
  119. \def\horizreformatcell{\setbox0=\vtop{\noindent\unhcopy0\endgraf\ifcase
  120. \prevgraf\global\advance\spanspace\ourspace\global\ourspace\zpt\addtobomblist
  121. \or\global\prevspace=\ourspace\addtobomblist\or\setbox2=\lastbox\unskip
  122. \unpenalty\setbox1=\lastbox\global\setbox7=\hbox to.5\wd7{\kern\spanspace
  123. \unhbox2 \unskip\unskip\unpenalty\global\advance\prevspace2\spanspace\kern-%
  124. \prevspace\hskip\parfillskip}\global\ourspace\zpt\prevspace=\wd7
  125. \addtobomblist\global\setbox5=\hbox to\prevspace{\unhbox1 \unskip\unpenalty
  126. \kern-\spanspace\global\spanspace\zpt\hskip\parfillskip}\global\prevspace\zpt
  127. \fi}}
  128. \newif\ifmoremapargs\newif\ifmapargisupper
  129. \def\gettwoargs{\let\upperlabel\empty\let\lowerlabel\empty\moremapargstrue
  130. \mapargisuppertrue\def\cmd{\mapargisupperfalse\ifmoremapargs\then\let\next
  131. \whatis\let\cmd\thecmd\else\let\next\thecmd\fi\next}\whatis}
  132. \def\whatis{\futurelet\thenexttoken\showcat}
  133. \def\getlabeldocmd#1{\ifmapargisupper\def\upperlabel{#1}\else\def\lowerlabel{%
  134. #1}\fi\cmd}
  135. \def\eattokengetlabeldocmd#1{\getlabeldocmd}
  136. \def\eatspacerepeat{\afterassignment\whatis\let\junk= }
  137. \def\catcase#1:#2\esac#3\esacs{{\ifcat\noexpand\thenexttoken#1\gdef\next{#2}%
  138. \else\gdef\next{#3\esacs}\fi}\next}\def\tokcase#1:#2\esac#3\esacs{{\ifx
  139. \thenexttoken#1\gdef\next{#2}\else\gdef\next{#3\esacs}\fi}\next}\def\default:%
  140. #1\esac#2\esacs{#1}\let\esacs\relax
  141. \def\showcat{\catcase\egroup:\moremapargsfalse\cmd\esac\catcase{&}:%
  142. \moremapargsfalse\cmd\esac\catcase$:\moremapargsfalse\cmd\esac\catcase^:%
  143. \mapargisuppertrue\eattokengetlabeldocmd\esac\catcase_:\mapargisupperfalse
  144. \eattokengetlabeldocmd\esac\catcase{ }:\eatspacerepeat\esac\tokcase{\cr}:%
  145. \moremapargsfalse\cmd\esac\tokcase{\crcr}:\moremapargsfalse\cmd\esac\tokcase
  146. \end:\moremapargsfalse\cmd\esac\tokcase\enddiagram:\moremapargsfalse\cmd\esac
  147. \tokcase\across:\moremapargsfalse\cmd\esac\tokcase\relax:\moremapargsfalse
  148. \cmd\esac\tokcase\kern:\moremapargsfalse\cmd\esac\tokcase\mkern:%
  149. \moremapargsfalse\cmd\esac\default:\ifincommdiag\then\let\next\getlabeldocmd
  150. \else\moremapargsfalse\let\next\cmd\fi\next\esac\esacs}
  151. \newdimen\HorizontalLineHeight\HorizontalLineHeight0.628ex \newdimen
  152. \HorizontalLineDepth\HorizontalLineDepth-0.534ex \def\horizhtdp{height%
  153. \HorizontalLineHeight depth\HorizontalLineDepth} \newdimen
  154. \HorizontalMapLength\HorizontalMapLength5em \def\makeharrowpart#1{\hbox{%
  155. \mathsurround\zpt$\mkern-1.5mu{#1}\mkern-1.5mu$}} \def\justhorizline{-}
  156. \def\HorizontalMap#1#2#3#4#5{\setbox1=\makeharrowpart{#1}\def\arrowfillera{#2%
  157. }\def\arrowfillerb{#4}\setbox5=\makeharrowpart{#5}\ifx\arrowfillera
  158. \justhorizline\then\def\arra{\hrule\horizhtdp}\def\kea{\kern-0.01em}\let
  159. \arrstruthtdp\horizhtdp\else\def\kea{\kern-0.15em}\setbox2=\hbox{\kea${%
  160. \arrowfillera}$\kea}\def\arra{\copy2}\def\arrstruthtdp{height\ht2 depth\dp2 }%
  161. \fi\ifx\arrowfillerb\justhorizline\then\def\arrb{\hrule\horizhtdp}\def\keb{%
  162. kern-0.01em}\ifx\arrowfillera\empty\then\let\arrstruthtdp\horizhtdp\fi\else
  163. \def\keb{\kern-0.15em}\setbox4=\hbox{\keb${\arrowfillerb}$\keb}\def\arrb{%
  164. \copy4}\ifx\arrowfilera\empty\then\def\arrstruthtdp{height\ht4 depth\dp4 }\fi
  165. \fi\setbox3=\makeharrowpart{{#3}\vrule width\zpt\arrstruthtdp} \dimen3=\wd3
  166. \let\thecmd\execHorizontalMap\gettwoargs}
  167. \def\labelstyle{\ifincommdiag\textstyle\else\scriptstyle\fi}
  168. \def\execHorizontalMap{\setbox6=\hbox{$\quad\labelstyle\upperlabel\quad$}%
  169. \setbox7=\hbox{$\quad\labelstyle\lowerlabel\quad$}\dimen0=\wd6 \ifdim\dimen0<%
  170. \wd7\then\dimen0=\wd7\fi\ifdim\dimen0<\HorizontalMapLength\then\dimen0=%
  171. \HorizontalMapLength\fi\skip2=.5\dimen0 \ifincommdiag plus 1fill\fi minus\zpt
  172. \advance\skip2-.5\wd3 \skip4=\skip2 \advance\skip2-\wd1 \advance\skip4-\wd5
  173. \kern0.4em \box1 \xleaders\arra\hskip\skip2 \vbox\ifincommdiag\tozpt\fi{%
  174. \offinterlineskip\ifincommdiag\vss\fi\hbox to\dimen3{\hss\unhbox6\hss}\kern0.%
  175. 7ex \vtop\ifincommdiag\tozpt\fi{\box3 \kern0.7ex \hbox to\dimen3{\hss\unhbox7%
  176. \hss}\ifincommdiag\vss\fi}}\ifincommdiag\kern-.5\dimen3\penalty-9999\null
  177. \kern.5\dimen3\fi\xleaders\arrb\hskip\skip4 \box5 \kern0.4em }
  178. \newdimen\VerticalMapHeight\VerticalMapHeight5ex \newdimen\VerticalMapDepth
  179. \VerticalMapDepth4ex \newdimen\VerticalMapExtraHeight\VerticalMapExtraHeight
  180. \zpt\newdimen\VerticalMapExtraDepth\VerticalMapExtraDepth\zpt\newdimen
  181. \VerticalLineWidth\VerticalLineWidth0.04em \def\justverticalline{|}\def
  182. \makevarrowpart#1{\hbox\tozpt{\hss$\kern\VerticalLineWidth{#1}$\hss}}
  183. \def\VerticalMap#1#2#3#4#5{\setbox1=\makevarrowpart{#1}\def\arrowfillera{#2}%
  184. \setbox3=\makevarrowpart{#3}\def\arrowfillerb{#4}\setbox5=\makevarrowpart{#5}%
  185. \skip2=\VerticalMapHeight plus 1 fill \advance\skip2-\ht3 \advance\skip2%
  186. \VerticalMapExtraHeight\advance\skip2-\ht1 \advance\skip2-\dp1 \skip4=%
  187. \VerticalMapDepth plus 1 fill \advance\skip4-\dp3 \advance\skip4%
  188. \VerticalMapExtraDepth\advance\skip4-\ht5 \advance\skip4-\dp5 \ifx
  189. \arrowfillera\justverticalline\then\def\arra{\vrule width\VerticalLineWidth}%
  190. \def\kea{\kern-0.05ex}\else\def\kea{\kern-0.35ex}\setbox2=\vbox{\kea
  191. \makevarrowpart\arrowfillera\kea}\def\arra{\copy2}\fi\ifx\arrowfillerb
  192. \justverticalline\then\def\arrb{\vrule width\VerticalLineWidth}\def\keb{\kern
  193. -0.05ex}\else\def\keb{\kern-0.35ex}\setbox4=\vbox{\keb\makevarrowpart
  194. \arrowfillerb\keb}\def\arrb{\copy4}\fi\let\thecmd\execVerticalMap\gettwoargs}
  195. \def\execVerticalMap{\llap{$\labelstyle\upperlabel\>$}\vbox{\offinterlineskip
  196. \kern-\VerticalMapExtraHeight\kern0.9ex \box1 \kea\xleaders\arra\vskip\skip2%
  197. \kea\vtop{\box3 \keb\xleaders\arrb\vskip\skip4\keb\box5 \kern0.9ex \kern-%
  198. \VerticalMapExtraDepth}}\rlap{$\labelstyle\>\lowerlabel$}}
  199. \newif\ifPositiveGradient\PositiveGradienttrue\newif\ifClimbing\Climbingtrue
  200. \newcount\DiagonalChoice\DiagonalChoice1 \newcount\lineno\newcount\rowno
  201. \newcount\charno\newcount\DiagonalLineSegments\DiagonalLineSegments2
  202. \def\laf{\afterassignment\xlaf\charno='} \def\xlaf{\hbox{\tenln\char\charno}}
  203. \def\lah{\afterassignment\xlah\charno='} \def\xlah{\hbox{\rlap{\unhcopy2}%
  204. \tenln\char\charno}} \def\makedarrowpart#1{\hbox{\mathsurround\zpt${#1}$}}
  205. \def\DiagonalMap#1#2#3#4#5{\setbox2=\makedarrowpart{#2}\setbox1=%
  206. \makedarrowpart{#1}\setbox5=\makedarrowpart{#5}\ifPositiveGradient\then\let
  207. \mv\raise\else\let\mv\lower\fi\setbox0=\hbox{$\vcenter{\kern.9ex \hbox{\kern.%
  208. 4em \lineno=0 \mv-\ht1\box1 \loop\ifnum\lineno<\DiagonalLineSegments\mv
  209. \lineno\ht2\copy2 \advance\lineno1 \repeat\mv\lineno\ht2\box5 \kern.4em }%
  210. \kern.9ex }$} \dimen0=.5\wd0 \let\thecmd\execDiagonalLine\gettwoargs}
  211. \def\execDiagonalLine{\kern\dimen0 \mv.5\wd2\hbox\tozpt{\hss$\labelstyle
  212. \upperlabel$\kern.5\ht2}\kern-\dimen0 \box0 \kern-\dimen0 \mv-.5\wd2\hbox
  213. \tozpt{\kern.5\ht2$\labelstyle\lowerlabel$\hss}\kern\dimen0 }
  214. \def\rhvee{\mkern-10mu\gt} \def\lhvee{\lt\mkern-10mu} \def\dhvee{\vbox\tozpt{%
  215. \vss\hbox{$\vee$}}} \def\uhvee{\vbox\tozpt{\hbox{$\wedge$}\vss}} \def\rhcvee{%
  216. \mkern-10mu\succ} \def\lhcvee{\prec\mkern-10mu} \def\dhcvee{\vbox\tozpt{\vss
  217. \hbox{$\curlyvee$}}} \def\uhcvee{\vbox\tozpt{\hbox{$\curlywedge$}\vss}} \def
  218. \rhvvee{\mkern-10mu\gg} \def\lhvvee{\ll\mkern-10mu} \def\dhvvee{\vbox\tozpt{%
  219. \vss\hbox{$\vee$}\kern-.6ex\hbox{$\vee$}}} \def\uhvvee{\vbox\tozpt{\hbox{$%
  220. \wedge$}\kern-.6ex\hbox{$\wedge$}\vss}} \def\twoheaddownarrow{\rlap{$%
  221. \downarrow$}\raise-.5ex\hbox{$\downarrow$}} \def\twoheaduparrow{\rlap{$%
  222. \uparrow$}\raise.5ex\hbox{$\uparrow$}} \def\triangleup{{\scriptscriptstyle
  223. \bigtriangleup}} \def\littletriangledown{{\scriptscriptstyle\triangledown}}
  224. \def\htdot{\mkern3.15mu\cdot\mkern3.15mu} \def\vtdot{\vbox to 1.46ex{\vss
  225. \hbox{$\cdot$}}} \def\utbar{\vrule height 0.093ex depth\zpt width 0.4em} \let
  226. \dtbar\utbar\def\rtbar{\mkern1.5mu\vrule height 1.1ex depth.06ex width .04em%
  227. \mkern1.5mu} \let\ltbar\rtbar\def\rthooka{\raise.603ex\hbox{$%
  228. \scriptscriptstyle\subset$}} \def\lthooka{\raise.603ex\hbox{$%
  229. \scriptscriptstyle\supset$}} \def\rthookb{\raise-.022ex\hbox{$%
  230. \scriptscriptstyle\subset$}} \def\lthookb{\raise-.022ex\hbox{$%
  231. \scriptscriptstyle\supset$}} \def\dthookb{\hbox{$\scriptscriptstyle\cap$}%
  232. \mkern5.5mu} \def\uthookb{\hbox{$\scriptscriptstyle\cup$}\mkern4.5mu} \def
  233. \dthooka{\mkern6mu\hbox{$\scriptscriptstyle\cap$}} \def\uthooka{\mkern6mu%
  234. \hbox{$\scriptscriptstyle\cup$}} \def\hfdot{\mkern3.15mu\cdot\mkern3.15mu}
  235. \def\vfdot{\vbox to 1.46ex{\vss\hbox{$\cdot$}}} \def\vfdashstrut{\vrule width%
  236. \zpt height1.3ex depth0.7ex} \def\vfthedash{\vrule width\VerticalLineWidth
  237. height0.6ex depth \zpt} \def\hfthedash{\vrule\horizhtdp width 0.26em} \def
  238. \hfdash{\mkern5.5mu\hfthedash\mkern5.5mu} \def\vfdash{\vfdashstrut\vfthedash}
  239. \def\dmcornervert{\vrule width\VerticalLineWidth height\HorizontalLineHeight}
  240. \def\rdmcorner{\kern.4em\dmcornervert\vrule width .4em \horizhtdp} \def
  241. \ldmcorner{\vrule width .4em \horizhtdp\dmcornervert\kern.4em} \def\rumcorner
  242. {\kern.4em\vrule width .4em \horizhtdp} \def\lumcorner{\vrule width .4em
  243. \horizhtdp\kern.4em} \def\urmcorner{\mkern-4.2mu} \let\drmcorner\urmcorner
  244. \let\dlmcorner\urmcorner\let\ulmcorner\urmcorner
  245. \def\NorthWest{\PositiveGradientfalse\Climbingtrue\DiagonalChoice0 } \def
  246. \NorthEast{\PositiveGradienttrue\Climbingtrue\DiagonalChoice1 } \def
  247. \SouthWest{\PositiveGradienttrue\Climbingfalse\DiagonalChoice3 } \def
  248. \SouthEast{\PositiveGradientfalse\Climbingfalse\DiagonalChoice2 } \def\nwhTO{%
  249. \nwarrow\mkern-1mu} \def\nehTO{\mkern-.1mu\nearrow} \def\sehTO{\searrow\mkern
  250. -.02mu} \def\swhTO{\mkern-.8mu\swarrow} \def\NW{\NorthWest\DiagonalMap{\lah
  251. 111}{\laf100}{\laf100}{\laf100}{\laf100}} \def\NE{\NorthEast\DiagonalMap{\laf
  252. 0}{\laf0}{\laf0}{\laf0}{\lah22}} \def\SW{\SouthWest\DiagonalMap{\lah11}{\laf0%
  253. }{\laf0}{\laf0}{\laf0}} \def\SE{\SouthEast\DiagonalMap{\laf100}{\laf100}{\laf
  254. 100}{\laf100}{\lah122}}
  255. \def\rTo{\HorizontalMap\empty-\empty-\rhvee} \def\lTo{\HorizontalMap\lhvee-%
  256. \empty-\empty} \def\dTo{\VerticalMap\empty|\empty|\dhvee} \def\uTo{%
  257. \VerticalMap\uhvee|\empty|\empty} \let\uFrom\uTo\let\lFrom\lTo
  258. \def\rDotsto{\HorizontalMap\empty\hfdot\hfdot\hfdot\rhvee} \def\lDotsto{%
  259. \HorizontalMap\lhvee\hfdot\hfdot\hfdot\empty} \def\dDotsto{\VerticalMap\empty
  260. \vfdot\vfdot\vfdot\dhvee} \def\uDotsto{\VerticalMap\uhvee\vfdot\vfdot\vfdot
  261. \empty} \let\uDotsfrom\uDotsto\let\lDotsfrom\lDotsto
  262. \def\rDashto{\HorizontalMap\empty\hfdash\hfdash\hfdash\rhvee} \def\lDashto{%
  263. \HorizontalMap\lhvee\hfdash\hfdash\hfdash\empty} \def\dDashto{\VerticalMap
  264. \empty\vfdash\vfdash\vfdash\dhvee} \def\uDashto{\VerticalMap\uhvee\vfdash
  265. \vfdash\vfdash\empty} \let\uDashfrom\uDashto\let\lDashfrom\lDashto
  266. \def\rImplies{\HorizontalMap==\empty=\Rightarrow} \def\lImplies{%
  267. \HorizontalMap\Leftarrow=\empty==} \def\dImplies{\VerticalMap\|\|\empty\|%
  268. \Downarrow} \def\uImplies{\VerticalMap\Uparrow\|\empty\|\|} \let\uImpliedby
  269. \uImplies\let\lImpliedby\lImplies
  270. \def\rMapsto{\HorizontalMap\rtbar-\empty-\rhvee} \def\lMapsto{\HorizontalMap
  271. \lhvee-\empty-\ltbar} \def\dMapsto{\VerticalMap\dtbar|\empty|\dhvee} \def
  272. \uMapsto{\VerticalMap\uhvee|\empty|\utbar} \let\uMapsfrom\uMapsto\let
  273. \lMapsfrom\lMapsto
  274. \def\rIntoA{\HorizontalMap\rthooka-\empty-\rhvee} \def\rIntoB{\HorizontalMap
  275. \rthookb-\empty-\rhvee} \def\lIntoA{\HorizontalMap\lhvee-\empty-\lthooka} \def
  276. \lIntoB{\HorizontalMap\lhvee-\empty-\lthookb} \def\dIntoA{\VerticalMap
  277. \dthooka|\empty|\dhvee} \def\dIntoB{\VerticalMap\dthookb|\empty|\dhvee} \def
  278. \uIntoA{\VerticalMap\uhvee|\empty|\uthooka} \def\uIntoB{\VerticalMap\uhvee|%
  279. \empty|\uthookb} \let\uInfromA\uIntoA\let\uInfromB\uIntoB\let\lInfromA\lIntoA
  280. \let\lInfromB\lIntoB\let\rInto\rIntoA\let\lInto\lIntoA\let\dInto\dIntoB\let
  281. \uInto\uIntoA
  282. \def\rEmbed{\HorizontalMap\gt-\empty-\rhvee} \def\lEmbed{\HorizontalMap\lhvee
  283. -\empty-\lt} \def\dEmbed{\VerticalMap\vee|\empty|\dhvee} \def\uEmbed{%
  284. \VerticalMap\uhvee|\empty|\wedge}
  285. \def\rProject{\HorizontalMap\empty-\empty-\triangleright} \def\lProject{%
  286. \HorizontalMap\triangleleft-\empty-\empty} \def\uProject{\VerticalMap
  287. \triangleup|\empty|\empty} \def\dProject{\VerticalMap\empty|\empty|%
  288. \littletriangledown}
  289. \def\rOnto{\HorizontalMap\empty-\empty-\twoheadrightarrow} \def\lOnto{%
  290. \HorizontalMap\twoheadleftarrow-\empty-\empty} \def\dOnto{\VerticalMap\empty|%
  291. \empty|\twoheaddownarrow} \def\uOnto{\VerticalMap\twoheaduparrow|\empty|%
  292. \empty} \let\lOnfrom\lOnto\let\uOnfrom\uOnto
  293. \def\hEq{\HorizontalMap==\empty==} \def\vEq{\VerticalMap\|\|\empty\|\|} \let
  294. \rEq\hEq\let\lEq\hEq\let\uEq\vEq\let\dEq\vEq
  295. \def\hLine{\HorizontalMap\empty-\empty-\empty} \def\vLine{\VerticalMap\empty|%
  296. \empty|\empty} \let\rLine\hLine\let\lLine\hLine\let\uLine\vLine\let\dLine
  297. \vLine
  298. \def\rPto{\HorizontalMap\empty-\empty-\rightharpoonup} \def\lPto{%
  299. \HorizontalMap\leftharpoonup-\empty-\empty} \def\uPto{\VerticalMap
  300. \upharpoonright|\empty|\empty} \def\dPto{\VerticalMap\empty|\empty|%
  301. \downharpoonright} \let\lPfrom\lPto\let\uPfrom\uPto
  302. \def\drBent{\VerticalMap\empty\empty\rdmcorner|\empty} \def\dlBent{%
  303. \VerticalMap\empty\empty\ldmcorner|\empty} \def\urBent{\VerticalMap\empty|%
  304. \rumcorner\empty\empty} \def\ulBent{\VerticalMap\empty|\lumcorner\empty\empty
  305. } \def\rdBent{\HorizontalMap\empty\empty\drmcorner-\empty} \def\ldBent{%
  306. \HorizontalMap\empty-\dlmcorner\empty\empty} \def\ruBent{\HorizontalMap\empty
  307. \empty\urmcorner-\empty} \def\luBent{\HorizontalMap\empty-\ulmcorner\empty
  308. \empty}
  309. \def\drBentto{\VerticalMap\empty\empty\rdmcorner|\dhvee} \def\dlBentto{%
  310. \VerticalMap\empty\empty\ldmcorner|\dhvee} \def\urBentto{\VerticalMap\uhvee|%
  311. \rumcorner\empty\empty} \def\ulBentto{\VerticalMap\uhvee|\lumcorner\empty
  312. \empty} \def\rdBentto{\HorizontalMap\drmcorner-\empty-\rhvee} \def\ldBentto{%
  313. \HorizontalMap\lhvee-\empty-\dlmcorner\empty\empty} \def\ruBentto{%
  314. \HorizontalMap\urmcorner-\empty-\rhvee} \def\luBentto{\HorizontalMap\lhvee-%
  315. \empty-\ulmcorner}
  316. \def\pile#1{{\incommdiagtrue\null\baselineskip\zpt\lineskip\zpt\lineskiplimit
  317. \zpt\mathsurround\zpt\tabskip\zpt\let\\\cr\vcenter{\halign{ \hfil$##$\hfil\cr
  318. #1 \crcr}}}}
  319. \def\SEpbk{\rlap{\smash{\kern0.1em \vrule depth 2.67ex height -2.55ex width 0%
  320. .9em \vrule height -0.46ex depth 2.67ex width .05em }}} \def\SWpbk{\llap{%
  321. \smash{\vrule height -0.46ex depth 2.67ex width .05em \vrule depth 2.67ex
  322. height -2.55ex width .9em \kern0.1em }}} \def\NEpbk{\rlap{\smash{\kern0.1em
  323. \vrule depth -3.48ex height 3.67ex width 0.95em \vrule height 3.67ex depth -1%
  324. .39ex width .05em }}} \def\NWpbk{\llap{\smash{\vrule height 3.6ex depth -1.39%
  325. ex width .05em \vrule depth -3.48ex height 3.67ex width .95em \kern0.1em }}}
  326. \def\hboxsm#1{\setbox0=\hbox{#1}\ht0\zpt\dp0\zpt\box0}
  327. \textwidth=6.5in
  328. \oddsidemargin=0in
  329. \evensidemargin=0in
  330. \setlength{\baselineskip}{16pt}
  331. \parskip=14pt
  332. \parindent=0pt
  333. \hyphenation{hom-ob-ject hom-ob-jects}
  334. % Springer-Verlag:
  335. %\magnification=\magstep1
  336. %\vsize=23.5true cm
  337. %\hsize=16true cm
  338. %\nopagenumbers
  339. %\topskip=1truecm
  340. %\headline={\tenrm\hfil\folio\hfil}
  341. %\raggedbottom
  342. %\abovedisplayskip=3mm
  343. %\belowdisplayskip=3mm
  344. %\abovedisplayshortskip=3mm
  345. %\belowdisplayshortskip=3mm
  346. %\normalbaselineskip=12pt
  347. %\normalbaselines
  348. \begin{document}
  349. \title{Temporal Structures} 
  350. \author{Ross Casley$\dagger$       \and Roger F. Crew$\dagger$    \and
  351.     Jos\'e Meseguer$\ddagger$  \and Vaughan Pratt$\dagger$}
  352. %\date{}
  353. \maketitle
  354. {\parindent=0pt
  355. $\dagger$ Dept. of Computer Science, Stanford University, Stanford, CA 94305 \\
  356. $\dagger$ Supported by the National Science Foundation under grant
  357. CCR-8814921 \\
  358. $\ddagger$ SRI International, Menlo Park, CA 94025 and \\
  359. Center for the Study of Language and Information, Stanford University, Stanford, CA 94305 \\
  360. $\ddagger$ Supported by the Office of Naval Research under contracts
  361. N00014-86-C-0450 and N00014-88-C-0618, and by the National Science
  362. Foundation under grant CCR-8707155.
  363. This paper is a revision of a CTCS-89 paper \cite{CCMP}.
  364. \begin{abstract}
  365. We combine the principles of the Floyd-Warshall-Kleene algorithm,
  366. enriched categories, and Birkhoff arithmetic, to yield a useful class
  367. of algebras of transitive vertex-labeled spaces.  The motivating
  368. application is a uniform theory of abstract or parametrized time in
  369. which to any given notion of time there corresponds an algebra of
  370. concurrent behaviors and their operations, always the same operations
  371. but interpreted automatically and appropriately for that notion of
  372. time.  An interesting side application is a language for succinctly
  373. naming a wide range of datatypes.
  374. \end{abstract}
  375. \section{Introduction}
  376. Posets, metric spaces, ``closed'' automata, and categories have in
  377. common the notion of a {\it space} of points with distances between
  378. points.  These distances are respectively truth values, reals,
  379. languages, and sets.
  380. Distances have two facets, logical and metrical.  The logical facet is
  381. expressed respectively via implications $p\to q$ between truth values,
  382. comparisons $x\ge y$ between reals, inclusions $L\subseteq M$ between
  383. languages, and functions $f:X\to Y$ between sets.  The metrical facet
  384. is expressed via a suitable monotone associative operation,
  385. respectively conjunction $p\land q$, addition $x+y$, concatenation
  386. $LM$, and cartesian product $X\times Y$.  These two facets confer on
  387. any such set of distances the attributes of an ordered monoid
  388. $(D,\le,\otimes,I)$, having simultaneously the attributes of a poset
  389. $(D,\le)$ and a monoid $(D,\otimes,I)$, with $\otimes$ monotone in each
  390. argument with respect to $\le$.  For such cases as our last example,
  391. sets as distances, the poset structure is generalized to category
  392. structure, so that rather than an ordered monoid we have a monoidal
  393. category, for which ``monotone operation'' must be correspondingly
  394. generalized to ``functor.''
  395. The transitivity law $u\le v\land v\le w\to u\le w$ for a poset, the
  396. triangle inequality $d(u,v)+d(v,w)\ge d(u,w)$ for a metric space, the
  397. requirement $L_{uv}L_{vw}\subseteq L_{uw}$ for an automaton to be
  398. considered closed, and the family of composition operations
  399. $m_{uvw}:\Hom(v,w)\times\Hom(u,v)\to\Hom(u,w)$ for a category,
  400. respectively combine these two facets via essentially the same basic
  401. triangle inequality.
  402. Each of these classes of generalized metric spaces has a natural notion
  403. of map, respectively monotone functions, contractions, morphisms of
  404. automata, and functors, in each case making that class a category with
  405. those maps as its morphisms.
  406. In computer science some of the common elements of these notions have
  407. been unified by organizing distances as an {\it idempotent semiring},
  408. an ordered monoid whose underlying partial order contains all sups and
  409. whose monoidal operation preserves (i.e. distributes over) those sups.
  410. The basis for this unification is the O$(n^3)$ time procedure of Roy
  411. \cite{Roy59} and independently that of S. Warshall \cite{War62} for
  412. computing the transitive closure of a binary relation on $n$ elements
  413. presented as an $n\times n$ Boolean (0- and 1-valued) matrix.  The
  414. unification was hinted at by R.W. Floyd \cite{Flo62} who observed that
  415. Warshall's procedure would compute shortest paths instead of transitive
  416. closure if Booleans were replaced by nonnegative reals, disjunction by
  417. {\bf min}, and conjunction by addition.  The uniform expression of this
  418. common algorithm in terms of semirings was first described by Robert
  419. and Ferland \cite{RF}.  Synonyms for this notion of semiring include
  420. regular algebra \cite{Con}, Kleene algebra \cite{Koz80b,Koz81a}, and
  421. quantale \cite{Vic89}.
  422. Other instantiations of this abstract algorithm were subsequently
  423. found.  Replacing Booleans in Warshall's algorithm by languages,
  424. conjunction by concatenation, and disjunction by union, yields Kleene's
  425. algorithm for ``closing'' an automaton $M$ having $n$ states, viewed as
  426. an $n\times n$ matrix of (finitely presented) regular languages, from
  427. which one may then easily read off a regular expression denoting the
  428. language $L(M)$ accepted by $M$ \cite{AHU}.  Even Gaussian elimination
  429. was found to be so describable in the (nonidempotent) ring of reals
  430. made a field via $1/(1-x)=1+x+x^2+\ldots$.
  431. Independently and working in a categorical setting, Eilenberg and Kelly
  432. \cite{EK66a} developed a more categorically sophisticated version of
  433. the same generalization of metric space under the name enriched
  434. category or $V$-category.  In place of a semiring they used a monoidal
  435. category $V$.  Distances became homobjects, a generalization of
  436. homset.  The logical facet was expressed by the category structure of
  437. $V$: the morphisms of $V$ permitted ``comparisons'' of homobjects.  The
  438. metrical facet was expressed by the monoidal structure of $V$:
  439. ``consecutive'' homobjects were combined by the binary operation of the
  440. monoid.
  441. Although Eilenberg and Kelly described enriched categories in their
  442. full generality, their motivating applications were confined to $V$'s
  443. forming classes rather than sets, an emphasis continued in Kelly's
  444. subsequent book on enriched categories \cite[p22]{Kel}.  Yet in 1974
  445. F.W. Lawvere \cite{Law} in an excellent advertisement for the utility
  446. of enriched categories emphasized $V$'s that were semirings, hence sets
  447. rather than classes, and with category structure merely that of a
  448. poset.  This brought enriched categories into close proximity to the
  449. parallel computer science development.  Nevertheless this connection
  450. between enriched categories and shortest-path algorithms remained
  451. undetected for another 15 years \cite{Pr89a}.
  452. The present paper starts from the notion of a partial order as a
  453. behavior of a ``truly concurrent'' process, and uniformly extends it to
  454. other classes of spaces via the above correspondences.  This extension
  455. was first proposed by Pratt \cite{Pr84} with just the semiring view in
  456. mind; here we extend that proposal to take advantage of the enriched
  457. category perspective as well as additional basic operations whose
  458. utility were not at all apparent at the time, and develop the resulting
  459. framework in detail.
  460. This approach achieves a considerable unification of ideas relevant to
  461. concurrency, as well as making connections with other areas to which
  462. the semiring and enrichment insights apply.  In the concurrency
  463. application we characterize time abstractly as an ordered monoid, and
  464. more generally albeit speculatively as a monoidal category, whose
  465. objects are temporal quantities.  From this model of time we construct
  466. via enrichment a category of behaviors.  A behavior, or computation, is
  467. a space whose points represent events and whose distances are to be
  468. interpreted as delays between events.
  469. Various natural operations on such spaces correspond to useful
  470. constructs for concurrent programming languages.  These operations are
  471. functors, most of which prove to be definable via familiar categorical
  472. constructions.  We treat only concurrency and not nondeterminism
  473. (choice), in that we work only with single behaviors rather than sets
  474. of them representing alternative behaviors.
  475. An appealing feature of this approach is its abstractness.  A single
  476. framework is developed independently of choice of ordered monoid or
  477. monoidal category.  Instantiating the whole framework for a particular
  478. monoidal structure yields the corresponding model of concurrency
  479. incorporating that structure as its notion of time, with all the
  480. operations of the framework likewise instantiated.  The development
  481. lends itself to the application of categorical methods.
  482. A practical application of this perspective is to improving the
  483. organization of current theories of real time in concurrency modeling.
  484. A case in point is the recent work of H. Lewis \cite{Lew90}.  Lewis
  485. works with state diagrams each of whose transitions is labeled with a
  486. set of $O(n^2)$ intervals, with larger sets at later transitions, per
  487. his Figure 6.  In our framework the essence of this information would
  488. be captured with one real labeling each edge of the {\it transitive
  489. closure} of the diagram, with the delay from $u$ to $v$ being a lower
  490. bound whose matching upper bound (to form an interval) is the negation
  491. of the delay from $v$ to $u$.
  492. The ordered monoids that have previously been found useful in this
  493. setting are all useful here for one view or another of time.  In
  494. addition we identify a class of finite generalizations of the ordered
  495. monoid $\two$ of truth values which we call the {\it idempotent closed
  496. ordinals} or ico's.  There are $2^{n-2}$ such closed or residuated
  497. ordered monoids with $n$ elements, exactly one of which is cartesian
  498. closed, proved via a pretty representation theorem.  We describe
  499. natural applications for the two three-element ico's $\three$ and
  500. $\three'$, and show where each has in effect been used in the
  501. concurrency literature.
  502. The operations on spaces ordinarily considered in the context of
  503. shortest-path algorithms and their cousins can be collectively
  504. understood as Kleene's {\it regular} operations $L+M$, $LM$, and $L^*$,
  505. defined by Kleene only for languages but all equally meaningful for the
  506. other domains, even the one for Gaussian elimination (with
  507. $x^*={1/(1-x)}$).  In terms of matrices these are the operations of
  508. pointwise sum of two $m\times n$ matrices $M,N$ to yield an $m\times n$
  509. matrix $M+N$, product of an $m\times k$ matrix $M$ by a $k\times n$
  510. matrix $N$ to yield an $m\times n$ matrix $MN$, and reflexive and/or
  511. transitive closure of an $n\times n$ matrix $M$ to yield an $n\times n$
  512. matrix $M^*$.  A reasonably close connection between such matrices and
  513. spaces can be made by regarding rectangular $m\times n$ matrices as
  514. complete bipartite graphs from $m$ vertices to $n$ vertices, and in the
  515. other direction ordinary (nonbipartite) directed graphs as square
  516. matrices, with distances entering as edge labels.
  517. This paper adds to these regular operations a number of other
  518. operations such as disjoint union or juxtaposition, tensor product,
  519. concatenation, exponentiation, and useful variations on these obtained
  520. by generalizing products to pullbacks and coproducts to pushouts.
  521. These operations are generally better matched to the concurrency
  522. modeling application than the regular operations, both extrinsically
  523. and intrinsically.  Extrinsically juxtaposition captures concurrence,
  524. tensor product captures orthocurrence, etc.  And intrinsically these
  525. operations impose few if any constraints on relationships between
  526. vertex sets of their arguments, unlike the regular operations.
  527. An early and striking example of these ``nonregular'' operations is
  528. provided by Birkhoff's arithmetic \cite{Birk37,Birk42} of posets up to
  529. isomorphism under addition, multiplication, and exponentiation each of
  530. two kinds, cardinal and ordinal.  Birkhoff's application was to the
  531. arithmetic of cardinals and ordinals, which he proposed to unify by
  532. regarding both as posets, with cardinals as discrete posets and
  533. ordinals as linear.  In place of two sorts of data he then had two
  534. sorts of operations.
  535. In relating Birkhoff arithmetic to concurrent programming we make the
  536. connections cardinal-concurrent and ordinal-sequential.  Discrete
  537. posets model the purely concurrent behaviors (no sequentiality) while
  538. linearly ordered posets model the purely sequential.  The cardinal
  539. operations map discrete sets to discrete, i.e. they preserve
  540. concurrency, while the ordinal operations map linear sets to linear,
  541. i.e. they preserve sequentiality.
  542. Our framework can then be viewed as a generalization of Birkhoff
  543. arithmetic, in several directions: several additional operations, many
  544. other metrics besides $\two$, provision of labels on points, and
  545. setting Birkhoff arithmetic in a suitable categorical framework.  We
  546. have not however succeeded in finding the right categorical expression
  547. of either ordinal multiplication (i.e.  lexicographic product) or
  548. ordinal exponentiation, which we therefore raise as an interesting
  549. problem.
  550. There is a recursive aspect to the enrichment process that permits a
  551. further generalization of this framework.  We introduce an operation we
  552. call $\D!$, the enriched category term for which is
  553. $V$-Cat,\footnote{We prefer $\D$ to $V$ as connoting distance or
  554. delay.} which takes a symmetric monoidal category $\D$ and returns the
  555. symmetric monoidal category $\D!$ of all small $\D$-categories.  For
  556. example if $\D$ is the monoidal category $\{0,1\}$ of truth values then
  557. $\D!$ is the monoidal category of preordered sets.  This construction
  558. can therefore be iterated to yield $\D!!$, $\D!!!$, etc.
  559. Behaviors as sets of events require not only delay information between
  560. events but information describing each event.  That is, we wish to
  561. label vertices independently of the labeling of edges.  From a set
  562. theoretic perspective there is nothing to this.  However from a
  563. category theoretic perspective, with some operations defined as limits
  564. or colimits the presence of labels is a nontrivial complication;
  565. consider for example coproducts in the category of vertex-labeled
  566. posets.  We define the category of $\E$-labeled $\D$-spaces, each of
  567. whose objects is an object $d$ of $\D$ (we call such a $d$ a
  568. $\D$-space) paired with an object $e$ of $\E$, along with a function
  569. $f:U_d\to V_e$ from the underlying set of $d$ (the points of the
  570. space $d$) to the underlying set of $e$ (typically the set $e$ itself,
  571. construed as an alphabet of labels) serving as a vertex labeling
  572. function.  The appropriate category of such $\E$-labeled $\D$-spaces is
  573. the comma category $(U,V)$.
  574. To make the comma-category construct iterable analogously to the
  575. iterability of enrichment we need to extend its arguments so as to
  576. carry both the structure we need for enrichment (i.e. a symmetric
  577. monoidal category) and that for the comma construction (hence we need a
  578. forgetful functor).  We denote this extension of the comma construction
  579. to these extended arguments by $\D\comma\E$.
  580. With these two operations, along with certain constants, we now have a
  581. language with such expressions as $\one!$, $\three!!\comma\one!$,
  582. $\R!$, etc.  The succinctness of each expression belies its content.
  583. For example the expression $\one!!!$ does not merely hint at the
  584. category of all 2-categories but specifies it in full detail, complete
  585. with all internal features such as the interchange law, 2-functors
  586. between 2-categories, etc.  Moreover it supplies some external
  587. features: it is a closed category, and is equipped with a forgetful
  588. functor to $\Set$ taking each 2-category to the set of its objects.
  589. However it is not a 3-category as it should be, or even a 2-category,
  590. and has no other useful forgetful functors such as to $\Cat$.  These
  591. restrictions reflect our particular recursive construction of
  592. categories, which yields only semiconcrete symmetric monoidal
  593. categories.
  594. \section{Operations}
  595. The motivating application of our framework is to define an algebra of
  596. concurrent behaviors (runs, computations), independently of any
  597. particular choice of notion of time.  In this section we describe the
  598. desired operations of such an algebra, and illustrate them for {\it
  599. dual} metric spaces, spaces in which distance $d$ from $u$ to $v$
  600. indicates that $v$ must follow $u$ by {\it at least} $d$ units (metric
  601. spaces would replace ``at least'' by ``at most'').
  602. In formal language theory, concatenation is defined on individual
  603. strings as well as on languages (sets of strings) whereas union and
  604. Kleene star are defined only on languages.  In the framework of the
  605. present paper strings are generalized to {\it behaviors}, defined as
  606. labeled spaces, with languages correspondingly generalized to {\it
  607. processes} as sets of behaviors.  We shall define only operations on
  608. individual behaviors, hence including concatenation but excluding union
  609. and Kleene star.  The operations we treat include all behavior
  610. operations of the process language of \cite{Pr86}, namely concurrence,
  611. orthocurrence, concatenation, and local concatenation, as well as new
  612. operations synchronized concurrence, exponentiation, product, and local
  613. product.  The process operations of that paper are linearization,
  614. union, intersection, complement, star, augment closure, and prefix
  615. closure, whose definition we defer for now pending the appropriate
  616. integration of our framework with the current understanding of
  617. nondeterminism.
  618. We now illustrate and define three forms of sum:  concurrence $p|q$,
  619. concatenation $p;^dq$, and local concatenation $p\lc^dq$.  In these
  620. examples all edges are labeled with reals or $\infty$, with absence of
  621. an edge interpreted as distance $-\infty$.  These examples may be taken
  622. as pomset examples by ignoring the edge labels (equivalent to taking
  623. $-\infty$ as 0 and everything else as 1), and as automata examples by
  624. treating distance $d$ as the set of all strings of length at most $d$
  625. (making $-\infty$ the empty language).
  626. In all of these forms of sum, the set of points of the sum is the
  627. disjoint union of those of $p$ and $q$.  That is, the basic step in
  628. forming the sum is to juxtapose $p$ and $q$.
  629. {\it Concurrence} $p|q$ is the least constrained form of sum.  Labels
  630. on points, and distances within $p$ and $q$, remain unchanged, while
  631. the distance from an event of $p$ to one of $q$ is $-\infty$, and
  632. likewise from $q$ to $p$.  {\it Disjoint} concurrence differs from
  633. concurrence in that the labels from $p$ and $q$ are ``marked'' to
  634. distinguish them:  the label $a$ becomes $a_0$ or $a_1$ according to
  635. whether the point it labels is from $p$ or $q$.
  636. \setlength{\unitlength}{0.0088in}
  637. \begin{center}
  638. \begin{picture}(671,130)(40,660)
  639. \put( 25,670){Concurrence $(a;^3b)|(c|d)$}
  640. \put( 45,715){$b$} \put( 45,755){$3$} \put( 52,790){$a$}
  641. \put( 55,785){\vector( 0,-1){ 55}}
  642. \put( 82,752){$|$} \put(103,790){$c$} \put(104,715){$d$}
  643. \put(105,730){$\bullet$}
  644. \put(105,780){$\bullet$}
  645. \put(134,753){$=$} \put(160,755){$3$} \put(166,715){$b$} \put(167,790){$a$}
  646. \put(170,780){\vector( 0,-1){ 50}}
  647. \put(192,790){$c$} \put(193,780){$\bullet$} \put(194,715){$d$}
  648. \put(195,730){$\bullet$}
  649. \put(230,670){Concatenation $(a;^3b);^2(c|d)$}
  650. \put(270,750){$3$} \put(282,790){$a$} \put(284,715){$b$}
  651. \put(285,787){\vector( 0,-1){ 55}}
  652. \put(312,754){$;^2$} \put(333,790){$c$} \put(334,715){$d$}
  653. \put(335,730){$\bullet$} \put(335,780){$\bullet$}
  654. \put(360,755){$=$} \put(390,750){$3$} \put(396,715){$b$} \put(397,790){$a$}
  655. \put(400,730){\vector( 1, 0){ 50}} \put(400,730){\vector( 1, 1){ 50}}
  656. \put(400,782){\vector( 0,-1){ 50}} \put(400,785){\vector( 1, 0){ 50}}
  657. \put(400,785){\vector( 1,-1){ 50}}
  658. \put(415,713){$2$} \put(416,736){$2$} \put(415,790){$5$}
  659. \put(438,748){$5$} \put(448,715){$d$} \put(448,790){$c$}
  660. \put(480,670){Local Concatenation $(a;^3B)\underline ;^2(c|D)$}
  661. \put(513,750){$3$} \put(520,715){$B$} \put(522,790){$a$}
  662. \put(525,787){\vector( 0,-1){ 55}}
  663. \put(552,754){$\underline ;^2$} \put(573,790){$c$} \put(575,715){$D$}
  664. \put(575,730){$\bullet$} \put(575,780){$\bullet$}
  665. \put(600,755){$=$} \put(630,750){$3$} \put(635,715){$B$} \put(637,790){$a$}
  666. \put(640,730){\vector( 1, 0){ 45}} \put(640,782){\vector( 0,-1){ 50}}
  667. \put(640,785){\vector( 1, 0){ 45}}
  668. \put(655,715){$2$} \put(655,790){$2$} \put(682,790){$c$} \put(684,715){$D$}
  669. \end{picture}
  670. \centerline{Figure 1.  Additive Operations.}
  671. \end{center}
  672. {\it Concatenation} $p;^dq$ is like $p|q$, differing only with respect
  673. to the distances from $p$ to $q$, which are the least possible
  674. distances no less than $d$.  Disjoint concatenation is to concatenation
  675. as disjoint concurrence is to concurrence.
  676. {\it Local concatenation} $p\lc^dq$ is intermediate in strength
  677. between concurrence and concatenation: it only imposes the additional
  678. distance constraints of concatenation between colocated elements of $p$
  679. and $q$.  For the above example we have identified location with case
  680. of label: lower case at one location, upper at the other.
  681. We now illustrate and define three forms of product, namely
  682. orthocurrence $p\otimes q$, product $p\times q$, and local product
  683. $p\underline\times q$.
  684. \setlength{\unitlength}{0.0088in}
  685. \begin{center}
  686. \setlength{\unitlength}{0.0088in}
  687. \begin{picture}(671,130)(40,520)
  688. \put( 20,530){Orthocurrence $(a;^3b)\otimes(c;^2d)$}
  689. \put( 40,615){$3$} \put( 45,575){$b$} \put( 45,650){$a$}
  690. \put( 50,645){\vector( 0,-1){ 55}}
  691. \put( 65,615){$\otimes$} \put( 85,575){$d$} \put(85,650){$c$} \put(90,615){$2$}
  692. \put( 90,645){\vector( 0,-1){ 55}}
  693. \put(115,615){$=$} \put(130,575){$bc$} \put(130,650){$ac$} \put(148,615){$3$}
  694. \put(145,645){\vector( 0,-1){ 50}} \put(145,645){\vector( 1, 0){ 55}}
  695. \put(150,590){\vector( 1, 0){ 50}} \put(150,645){\vector( 1,-1){ 45}}
  696. \put(170,575){$2$} \put(170,650){$2$} \put(175,620){$5$} \put(205,575){$bd$}
  697. \put(205,645){\vector( 0,-1){ 50}} \put(205,650){$ad$} \put(210,615){$3$}
  698. \put(270,530){Product $(a;^3b)\times(c;^2d)$}
  699. \put(275,615){$3$} \put(280,575){$b$} \put(280,650){$a$}
  700. \put(285,645){\vector( 0,-1){ 55}}
  701. \put(300,615){$\times$} \put(320,575){$d$} \put(320,650){$c$} \put(325,615){$2$}
  702. \put(325,645){\vector( 0,-1){ 55}}
  703. \put(350,615){$=$} \put(365,575){$bc$} \put(365,650){$ac$}
  704. \put(380,645){\vector( 0,-1){ 50}} \put(380,645){\vector( 1, 0){ 55}}
  705. \put(385,590){\vector( 1, 0){ 50}} \put(385,645){\vector( 1,-1){ 45}}
  706. \put(385,615){$3$} \put(405,575){$2$} \put(405,650){$2$} \put(410,620){$2$}
  707. \put(440,575){$bd$} \put(440,650){$ad$} \put(445,615){$3$}
  708. \put(440,645){\vector( 0,-1){ 50}}
  709. \put(500,530){Local Product $(a;^3b)\underline\times c(;^2D,;^1c)$}
  710. \put(505,615){$3$} \put(510,575){$B$} \put(510,650){$a$}
  711. \put(515,645){\vector( 0,-1){ 55}}
  712. \put(530,615){$\underline\times$}
  713. \put(550,575){$D$} \put(555,615){$2$} \put(570,650){$c$}
  714. \put(575,645){\vector( 1,-3){ 18.500}} \put(575,645){\vector(-1,-3){ 18.500}}
  715. \put(590,575){$e$} \put(590,615){$1$} \put(615,615){$=$} \put(635,640){$ac$}
  716. \put(652,640){\vector( 1, 0){ 45}}
  717. \put(665,588){$BD$} \put(670,645){$1$} \put(675,600){$\bullet$}
  718. \put(700,640){$ae$}
  719. \end{picture}
  720. \centerline{Figure 2.  Multiplicative Operations.}
  721. \end{center}
  722. The underlying set of each of these products is the cartesian product
  723. of the underlying sets of their arguments (or a subset thereof in the
  724. case of local product), while their labels are corresponding tuples:
  725. thus if $\mu$ assigns labels to points then the label $\mu(\<u,v>)$ in
  726. a product is $\<\mu_p(u),\mu_q(v)>$.
  727. {\it Orthocurrence} $p|q$ is distinguished from other products by the
  728. distance from $\<u,v>$ to $\<u',v'>$ being $d(u,u')+d(v,v')$.  {\it
  729. Product} $p\times q$ takes this distance to be min$(d(u,u'),d(v,v'))$.
  730. {\it Local product} $p\underline\times q$ is obtained from product by
  731. deleting all points with mixed locations (again indicated by case in
  732. the example), and reducing the distance between tuples at distinct
  733. locations to $-\infty$.
  734. For pomsets orthocurrence and product coincide, both combining the
  735. distances $d(u,u')$ and $d(v,v')$ via conjunction.  For automata they
  736. differ: orthocurrence uses concatenation, product intersection.
  737. {\em Basic Constants}.  The empty schedule, denoted $0$, has no
  738. events.  It is the identity for all sums: concurrence, concatenation,
  739. and local concatenation.  The unit schedule, denoted $I$, has one event
  740. with self-distance 0, and has the singleton alphabet $\{\bullet\}$,
  741. whence that one event is labeled $\bullet$.  Up to isomorphism $I$ is
  742. the identity for orthocurrence.  The top schedule, denoted 1, differs
  743. from $I$ in having self-distance $\infty$.  Up to isomorphism it is the
  744. identity for product.  (The isomorphism is not only between events but
  745. between labels, via the evident isomorphism between $\Sigma$ and
  746. $\Sigma\times\{\bullet\}$.)
  747. We have illustrated these operations and constants for (dual) metric
  748. spaces, and indicated how to derive the corresponding pomset and
  749. automata examples.  However these operations and constants also admit
  750. of obvious interpretations for the metrics themselves.  Concurrence is
  751. respectively max, disjunction, and union for each of the ordered
  752. monoids consisting of truth values, reals, and languages, and is the
  753. same operation as concatenation and local concatenation.  Orthocurrence
  754. is respectively arithmetic sum, conjunction, and concatenation.
  755. Product is respectively min, conjunction, and intersection, and is the
  756. same operation as local product.
  757. %{\em Exponentiation}.  Denoted $B^A$.  The events of this schedule are the
  758. %delay-preserving functions from $A$ to $B$.  For the pomset model we
  759. %consider $f$ to precede $g$ if $fa$ precedes $ga$ for all events $a$ in
  760. %$A$.  For the minimum delay model the delay from $f$ to $g$ is the infimum
  761. %of the delays from $fa$ to $ga$ taken over the events of $A$.  $B^A$ can
  762. %be interpreted as being derived from $B$ by redefining an event to be a
  763. %{\em pattern\/} of events defined by $A$.  For example if $A$ is simply an
  764. %ordered pair of events, then the events of $B^A$ are ordered pairs of
  765. %events in $B$.
  766. \section{Monoidal Categories and their Functors}
  767. Monoidal categories and enrichment are less well established in the
  768. computing literature than such other aspects of category theory as
  769. adjunctions.  We therefore recall here enough details of these notions
  770. to make this paper self-contained at least on a first reading by those
  771. familiar with at least adjunctions.  In addition our treatment will
  772. serve to define the perspective on these topics that we will assume of
  773. the reader, and to coordinate this perspective with the rest of the
  774. paper.  Considerably more information on these topics can be found in
  775. the books of Mac~Lane \cite{Mac} and Kelly \cite{Kel}.
  776. \subsection{Monoidal Categories}
  777. Informally, a monoidal category amounts to a structure that is both a
  778. monoid and a category.  Formally a {\it strict monoidal category}
  779. $\D=(D,\otimes,I)$ is a category $D$ together with a functor
  780. \hbox{$\otimes:D^2\to D$} called the {\it tensor product}
  781. \footnote{Mac~Lane writes $\otimes$ as $\Box$.} and an object $I$ of
  782. $D$ called the {\it unit}, such that the object part and the morphism
  783. part of $D$ each form a monoid under $\otimes$ with respective
  784. identities $I$ and $1_{I}$.  We refer to $(\otimes,I)$ as a {\it
  785. monoidal structure} for the category $\D$.
  786. The structure $(\Set,\times,\{\bullet\})$ with $\times$ cartesian product is
  787. not strict monoidal because in general $X\times(Y\times Z)$ is not
  788. equal to $(X\times Y)\times Z$, they are merely isomorphic.  Moreover
  789. there is a particular isomorphism we would like to be able to {\it
  790. assume} is the one meant when we say that they are isomorphic, namely
  791. $\alpha_{XYZ}:(X\times Y)\times Z\to X\times(Y\times Z)$ defined as
  792. $\alpha(\<\<x,y>,z>)=\<x,\<y,z>>$.  Similarly particular isomorphisms
  793. take the place of the two identity laws for the unit $I=\{\bullet\}$.
  794. We therefore define a more general notion.  A {\it monoidal category}
  795. $\D=(D,\otimes,I,\alpha,\lambda,\rho)$ is as for strict monoidal
  796. categories but specifying natural isomorphisms $\alpha:(c\otimes
  797. d)\otimes e\cong c\otimes(d\otimes e)$, $\lambda:I\otimes d\cong d$ and
  798. $\rho:d\otimes I\cong d$ in place of the usual three-axiom basis for
  799. the theory of monoids.  A {\it symmetric} monoidal category specifies
  800. an additional natural isomorphism $\gamma:d\otimes e\cong e\otimes d$.
  801. We shall confine ourselves to symmetric monoidal categories throughout,
  802. and understand ``monoidal'' to mean symmetric monoidal at all times.
  803. The intent of these isomorphisms is that they be canonical: if an
  804. element of one set corresponds to an element of another set at all,
  805. this is a universal or global correspondence.  In particular there may
  806. be at most one such isomorphism between two sets, and in the case of a
  807. set in isomorphism with itself that isomorphism must be the identity.
  808. This intuition is formalized via certain {\it coherence conditions},
  809. whose effect is that if there are multiple ways to infer by
  810. transitivity two isomorphisms between two sets, those isomorphisms must
  811. be the same.  A strict monoidal category amounts to a monoidal category
  812. whose such isomorphisms are all identities.
  813. A monoidal category $C$ is {\it left closed} ({\it right closed}) when
  814. ${-}\otimes b$ ($a\otimes{-}$) has a right adjoint.  When both exist it
  815. is called biclosed.  When $C$ is symmetric, either left closed or right
  816. closed implies biclosed, and in this case we simply call it closed.
  817. The right adjoint to ${-}\otimes b$ is notated ${-}^b:C\to C$ and
  818. defined by an isomorphism $\Hom(a\otimes b,c)$ and $\Hom(a,c^b)$
  819. natural in $a$ and $c$.  Setting $a$ to $I$ yields
  820. via $\lambda$ the natural isomorphism $b\to c\cong I\to c^b$, that is,
  821. $\Hom$ is naturally isomorphic to $\Hom':C\op\times
  822. C\stackrel{{-}^{-}}{\to}C\stackrel{\Hom(I,-)}{\longrightarrow}\Set$.
  823. In this sense ${-}^{-}$ {\it represents} $\Hom(b,c)$, making it the
  824. {\it internal hom}(functor).  As $\R\op_\ge$ in example (3) below
  825. shows, $I$ need not determine $\otimes$ and hence the internal hom even
  826. up to isomorphism, showing that it is possible for the internal hom to
  827. contain information not present in the external hom even together with
  828. Since left adjoints preserve colimits, we have in any closed category
  829. $(A+B)\otimes C\cong A\otimes C+B\otimes C$ and $C\otimes(A+B)\cong
  830. C\otimes A+C\otimes B$ when the coproduct $A+B$ exists and $A\otimes
  831. 0\cong 0\cong 0\otimes A$ when the initial object 0 exists.
  832. A category $D$ with all finite products determines the {\it cartesian}
  833. symmetric monoidal category $(D,\times,1)$.  When the latter is closed
  834. (common but not universal, e.g. {\bf Top}), $D$ is said to be {\it
  835. cartesian closed}.
  836. \subsection{Examples of Monoidal Categories}
  837. We illustrate the above definitions with the monoidal categories we
  838. will be using in KL.  Most of these will be closed and bicomplete, the
  839. kind we are most interested in.
  840. (1) Each successor ordinal $\bf n{+}1$, as an $n{+}1$-object category
  841. with $n{+}2 \choose 2$ morphisms $i\to j$ where $0\le i\le j\le n$,
  842. forms the cartesian closed category algebraic topologists call $[n]$.
  843. That is, the symmetric monoidal structure is $(n{+}1,\land,n)$, and the
  844. right adjoint of $\land$, the internal hom ${-}^{-}$, must be the
  845. largest $a$ such that $a\land b\le c$, namely $n$ when $b\le c$ and $c$
  846. otherwise.  The product of two such cartesian closed ordinals or cco's
  847. is the cco $[m]\times[n]=[m+n]$.
  848. But the category $\bf n{+}1$ = $[n]$ admits other monoidal structures,
  849. all strict since $\bf n{+}1$ has no nonidentity isomorphisms, and all
  850. bicomplete.  Of these, $2^n$ are idempotent ($x\otimes x=x$), since
  851. each is representable as a permutation of $\{0,1,\ldots,n\}$ whose
  852. domain partitions into two blocks on one of which the permutation is
  853. monotone and on the other antimonotone.
  854. Such a permutation can be written down by writing $0,1,2,\ldots,I$ (the
  855. monotone block) from left to right and then reversing direction so as
  856. to write $I+1,I+2,\ldots,n$ (the antimonotone block) from right to left
  857. interleaved arbitrarily with the monotone block, leaving $I$ at the far
  858. right.  For $n=3$ this can be done in eight ways, namely $0123$,
  859. $01_32$, $0_312$, $0_{32}1$, $_3012$, $_30_21$, $_{32}01$, $_{321}0$,
  860. here distinguishing the two blocks by writing the second as
  861. subscripts.  Then $x\otimes y$ is taken to be the earlier of $x$ and
  862. $y$ in the permutation.  Since $I$ is always at the right end of the
  863. permutation it will always be the identity of $x\otimes y$.  For
  864. $\otimes$ to be a functor it suffices that it be monotone, which the
  865. reader may verify.
  866. For $n>0$ exactly half of these are closed.  For to be closed we
  867. require that for any $b$ and $c$ there be a largest $a$ for which
  868. $a\otimes b\le c$.  Setting $c=0$ shows that $0\otimes b$ must be 0 for
  869. all $b$, whence a necessary condition is that the permutation start
  870. with 0.  But this is also sufficient since there then exists a solution
  871. in $a$ to $a\otimes b\le c$, namely $a=0$; finiteness then ensures a
  872. largest solution.  These then are the {\it idempotent closed ordinals}
  873. or ico's.
  874. There is therefore a unique ico {\bf 2}, namely $[1]$.  Here $\otimes$
  875. is $\land$ and $I=1$.  (The nonclosed one has $\otimes=\lor$ and
  876. $I=0$.) This category provides the metric for preordered sets.  This
  877. two-valued cartesian closed logic is that of ordinary precedence, where
  878. for any pair $u,v$ of events there are two cases: either $u$ is
  879. constrained to precede $v$, or not.
  880. There are two closed categories on 3, each appearing implicitly in one
  881. of H. Gaifman's two papers on concurrency.  In each, the elements of 3
  882. represent strengths of temporal precedence constraint between two
  883. events, with 0 representing no constraint.  In the noncartesian case,
  884. call it $\three'$, 1 represents nonstrict temporal precedence and 2
  885. strict, with $1\otimes 2=2$ ($u\le v<w\to u<w$).  This structure is
  886. hidden in the two-relation ``prosset'' model \cite{GP} used in the
  887. proof of Kahn's principle relative to a pomset-based semantics of nets
  888. \cite{Pr86}.
  889. For the cartesian closed $\three$, 1 denotes ``temporal'' or accidental
  890. order and 2 causal \cite{Ga89}.  Here $1\otimes 2=1$, that is, if $u$
  891. accidentally precedes $v$ whereas $v$ causes (necessarily precedes)
  892. $w$, then we may only infer that $u$ accidentally precedes $w$.  Thus
  893. one may identify the logic of causal and accidental precedence with the
  894. cartesian closed category $\three$.
  895. Of the four idempotent closed categories on 4, described by the first
  896. four permutations on the list five paragraphs above, the second and
  897. third have the same $I$, namely 2, but their internal homfunctors
  898. differ at $1^1$.  Composing $\Hom(I,-)$ with either yields the external
  899. homfunctor for 4, whence the category and $I$ together are not
  900. sufficient to determine either $\otimes$ or the internal homfunctor.
  901. However neither of these are cartesian closed, and in fact for all $n$
  902. the cartesian closed structure is the unique one with $I=n$.  We do not
  903. as yet have a natural application for any of the structures on 4.
  904. (2) We have already discussed $\Set$ with $\otimes$ taken to be
  905. cartesian product, as a basic example of a nonstrict category.  This
  906. monoidal structure for $\Set$ is cartesian closed, and will always be
  907. the one we have in mind when referring to $\Set$ as a monoidal
  908. category.  In the case of $\Set$ the internal homfunctor is {\it
  909. identified with} its external one.
  910. (3) Let $\R_\land$ denote the real numbers together with $\infty$ and
  911. $-\infty$ with the usual ordering and considered as a category in the
  912. usual way.  Now $\R_\land$ is bicomplete, and furthermore is cartesian
  913. closed with $a\otimes b=a\land b$, $I=\infty$, and internal homfunctor
  914. $c^b=\infty$ for $b\le c$ and $c$ otherwise (cf. the cartesian closed
  915. ordinals above).  $\R_\land$ is isomorphic to its opposite
  916. $\R\op_\lor$, the reals with their order reversed and with $\otimes$
  917. now $\lor$.  $\R\op_\lor$ is the metric used for so-called ultrametric
  918. spaces.
  919. However a more useful closed structure for our purposes will be that
  920. obtained by taking tensor product to be not min but +, making the unit
  921. 0, and with $\infty+({-}\infty)=-\infty$, necessary in order to be
  922. closed.  We denote it by $\R$, or $\R_+$ when there might be
  923. confusion.  To be closed requires $c^b$ satisfying $a+b\le c\cong a\le
  924. c^b$, for which $c^b=c-b$ is the patently obvious solution.  Hence $\R$
  925. is bicomplete and closed, but of course not cartesian closed since, as
  926. we saw with the ordinals, a category admits at most one cartesian
  927. closed structure.
  928. We use $\R$ to represent lower bounds on delay.  A distance of 5 units
  929. from event $u$ to event $v$ means that $v$ must wait at least 5 units
  930. after $u$.  Thus a delay of 0 from $u$ to $v$ simply asserts that $v$
  931. follows $u$, not necessarily strictly.
  932. Now a delay of -5 units from $u$ to $v$ indicates that $v$ may precede
  933. $u$ by at most 5 units.  Hence we can express upper bounds as negative
  934. lower bounds in the opposite direction.  So to indicate that $v$ must
  935. follow $u$ by 2 to 5 units we bound from below the delay from $u$ to
  936. $v$ by 2 and that from $v$ to $u$ by -5.
  937. Combining these two directions, we may read the two oppositely oriented
  938. edges between $u$ and $v$ as together defining an interval.
  939. Here as with $\R_\land$, $\R$ is isomorphic to its opposite $\R\op$,
  940. the reals with their order reversed, however this time with the only
  941. change to the monoidal structure being $\infty+(-\infty)=\infty$, this
  942. being the one bit of asymmetry in $\R$.  As we have seen, $\R\op$ is
  943. the monoidal structure associated with ordinary metric spaces.
  944. A sometimes useful closed subcategory of $\R\op$, namely $\R\op_\ge$,
  945. is obtained by omitting the negative reals and $-\infty$ \cite{Law}.
  946. The internal homfunctor then becomes {\it truncated} subtraction, in
  947. which negative differences are rounded up to 0.  This is the category
  948. of generalized metric spaces; if the further restrictions are made that
  949. distances be symmetric and distinct points are a nonzero distance apart
  950. then we have the usual category of metric spaces and their
  951. contractions, modulo a detail about constant factors in the
  952. contractions.  $\R\op_\lor$ may be similarly truncated and its $I$ set
  953. to 0 to yield Lawvere's basic example \cite{Law} of a cartesian and a
  954. noncartesian closed structure on the same category with the same I.
  955. (4) Take $\SR$ to be the category with objects arbitrary sets of reals
  956. and with morphisms $X\to Y$ just when $X\subseteq Y$.  This poset is
  957. cartesian closed when we take $\otimes=\cap$ and $I=\R$.  As with $\R$
  958. however we shall prefer a different, hence noncartesian, closed
  959. structure, namely $X\otimes Y = \{x+y\mid x\in X,y\in Y\}$ with
  960. $I=\{0\}$, and with internal homfunctor $Z^Y=\{x \in \R \mid \{x\}+Y
  961. \subseteq Z\}$.
  962. The meaning of a set as a delay is that it consists of the disallowed
  963. actual delays.  Thus $\emptyset$, like $-\infty$ in $\R$, is no
  964. constraint while $\R$, like $\infty$, disallows all delays.
  965. We may now find $\R$ and $\R\op$, as well as $\R\op$ truncated at 0, as
  966. subcategories of $\SR$.  We note in particular that
  967. $\R+\emptyset=\emptyset$, corresponding to $\infty+-\infty=-\infty$ in
  968. $\R$.
  969. (5) Any monoid $(M,\cdot,\epsilon)$ automatically forms a strict
  970. monoidal category by taking the set $M$ as a discrete category.
  971. Alternatively $M$ may be taken as indiscrete (the maximal preorder on
  972. $M$).  We refer to these as discrete and indiscrete monoids
  973. respectively.
  974. For a discrete monoid to be closed means simply that for all $b,c$,
  975. $a+b=c$ has a solution in $a$, whence closed discrete monoids coincide
  976. with groups.  No nontrivial discrete monoid has finite products or
  977. coproducts.
  978. An indiscrete monoid on the other hand is trivially closed with all
  979. limits and colimits.  Only the fact that it is strictly monoidal saves
  980. it from total anarchy.  A nonstrict monoidal codiscrete category is no
  981. more than an arbitrary binary operation on a pointed but otherwise
  982. indiscrete set; nevertheless all such are bicomplete and closed.
  983. (6) The category $\Pos$ of partially ordered sets forms a subcategory
  984. of the cartesian closed category $\Pros$ of preordered sets.  The
  985. tensor product is direct or cardinal \cite{Birk42} product of
  986. preorders.  The cartesian closed structure of $\Pros$ is inherited from
  987. that of its underlying metric, namely the cartesian closed $\two$.  The
  988. following section on enrichment treats the passage from the metric to
  989. the spaces in this example and the next two.
  990. By the same token Gaifman's computations with distinct accidental and
  991. causal orders \cite{Ga89} form a subcategory of a cartesian closed
  992. category of such computations with cycles allowed.  As with $\Pros$ the
  993. cartesian closed structure is inherited from that of its underlying
  994. metric, here $\three$.
  995. The Gaifman-Pratt ``prossets'' or preordered specification sets
  996. \cite{GP}, each consisting of a set with an irreflexive partial order
  997. $<$ and a preorder $\le$, with $u<v\le w\to u<w$, form a subcategory of
  998. a noncartesian closed category of ``preprossets'' in which $<$ is
  999. itself just a preorder, but still meeting the condition $u<v\le w\to
  1000. u<w$.
  1001. \subsection{Monoidal Functors}
  1002. Monoidal functors, as the appropriate morphisms of monoidal categories,
  1003. should preserve both the monoidal and category structure.  Just as
  1004. strict monoidal categories motivate monoidal categories, so do strict
  1005. monoidal functors motivate monoidal functors.  A {\it strict monoidal
  1006. functor\/} $F:\D\to\D'$ between monoidal categories $\D,\D$ is a
  1007. functor $F:D\to D'$ between their underlying categories satisfying
  1008. $Fx\otimes'Fy=F(x\otimes y)$ and $I'=FI$ for objects and similarly for
  1009. morphisms.  (The unit morphism is often written 1 instead of $I$ or
  1010. $1_I$.)
  1011. {\bf Definition}  A {\it lax monoidal functor}
  1012. $(F,\tau,t):(D,\otimes,I,\alpha,\lambda,\rho,\gamma)$ $\to$
  1013. $(D',\otimes',I',\alpha',\lambda',\rho',\gamma')$ consists of a functor
  1014. $F:D\to D'$, a natural transformation $\tau_{xy}:Fx\otimes'Fy\to
  1015. F(x\otimes y)$, and a morphism $t:I'\to FI$ of $D'$, with certain
  1016. coherence conditions requiring that natural transformations constructed
  1017. from $\tau$ and $t$ commute with $\alpha,\lambda,\rho,\gamma$ and all
  1018. the other natural transformations corresponding to the equations of the
  1019. theory of commutative monoids \cite{EK66a}.
  1020. When $\tau$ and $t$ are both isomorphisms or both identities we call
  1021. $F$ respectively {\it strong} or {\it strict}.  For the remainder of
  1022. this paper the default will be strong, that is, we take ``monoidal
  1023. functor'' to mean ``strong monoidal functor.''  In particular we take
  1024. the morphisms of the category {\bf SMON} of large (symmetric) monoidal
  1025. categories to be the strong monoidal functors.
  1026. We wish to be able to refer to the ``points'' of spaces.  This is
  1027. accomplished by the next definition.
  1028. {\bf Definition.}  The category $\SSM$ is the slice (comma) category
  1029. ${\bf SMON}/\Set$.  Its objects are pairs $(\D,U)$ called {\it
  1030. semiconcrete monoidal categories}, where $\D$ is a (large) monoidal
  1031. category and $U_\D:\D\to\Set$ is a monoidal ``forgetful functor'' for
  1032. $\D$.  The morphisms $F:(\D,U)\to(\D',U')$ of $\SSM$ are monoidal
  1033. functors satisfying $U=U'F$, $\tau_U=\tau_{U'}\tau_F$, $t_U=t_{U'}t_F$.
  1034. Our interest in $\SSM$ is that its members carry enough structure to
  1035. support the definitions of the operations $\D!$ and $\D\rhd\E$
  1036. constructing categories of spaces and labeled spaces.  While this adds
  1037. some complexity to the development of enrichment, it does demonstrate
  1038. the feasibility of adding such structure when needed.  It would be
  1039. particularly useful to have a characterization of what structures can
  1040. be so added.
  1041. All the examples of monoidal categories in our list above belong to
  1042. $\SSM$; of these, only the discrete monoids are not bicomplete.
  1043. $\Set$, $\Pos$, etc. are large objects in $\SSM$.  The ordinal $\one$
  1044. is the null object of $\SSM$.
  1045. Our insistence on the identity $U=U'F$, as opposed to just a natural
  1046. transformation from $U$ to $U'F$, makes for a clean division of labor
  1047. between $\SSM$, where the kind language KL operates, and the objects of
  1048. $\SSM$, where PSL operates.  The significance of this identity is that,
  1049. via functors of $\SSM$, KL may act on kinds without disturbing the
  1050. underlying sets of objects of those kinds.
  1051. For example when we replace a numeric metric by a Boolean one we {\it
  1052. identically} preserve the vertex sets of the affected behaviors; only
  1053. the distances between their elements change, from numbers to truth
  1054. values.  In PSL on the other hand we work in a fixed object $\D$ of
  1055. $\SSM$, where we may do violence to vertex sets and alphabets via
  1056. morphisms of $\D$, but where we cannot change to another $\D$ and so
  1057. have no control over the metric or the kind of alphabet.
  1058. As a pleasant fringe benefit the bidirectionality of the identity in
  1059. $U=U'F$ permits the domain of $\comma$ to consist of all pairs $F,G$ of
  1060. functors of $\SSM$, not just those for which there exists a natural
  1061. transformation from $U'F$ to $U$.  However this benefit would accrue
  1062. even from a natural isomorphism $h:U\to U'F$ (assuming $h$ commutes
  1063. with both $\tau$ and $t$), whereas identity results 
  1064. in total separation of the domains of KL and PSL.
  1065. \subsection{Examples of Monoidal Functors}
  1066. (1) Consider functors $F,G:\R\to \two$, defined by $F(x)=(x\ge 0)$ and
  1067. $G(x)= (x>-\infty)$.  Each functor equips its target with an
  1068. interpretation.  $F$ interprets $u\le v$ as saying that $u$ must
  1069. precede $v$, while $G$ makes it say that $v$ can only precede $u$ by a
  1070. bounded amount.  Only $G$ however is strong monoidal, since
  1071. $F(1+-1)=F(0)=1$ while $F(-1)\land F(1)=0$.  It is straightforward to
  1072. show that $G$ and the constantly true functors are the {\it only}
  1073. strong monoidal functors from $\R$ to $\two$.  In fact with the obvious
  1074. order on the functors from $\R$ to $\two$ to make $\two^\R$ a category,
  1075. we have $\two^\R\cong\two$ in $\SSM$, with the constant functor in
  1076. $\two^\R$ corresponding to 1 in $\two$.
  1077. Now consider any functor $F$ from $\two$ to $\R$.  $F$ must send 1 to
  1078. 0, so $F(0)$ cannot be positive.  Moreover $F(0) =
  1079. F(0\land0)=F(0)+F(0)$ whence $F(0)$ must be either $-\infty$ or 0.
  1080. Hence $\R^\two\cong\two$ (again with $\R^\two$ made a category via the
  1081. obvious order on its two functors), with the constant functor in
  1082. $\R^\two$ corresponding to 1 in $\two$.
  1083. (2) The endofunctor $x/2$ from $\R$ to $\R$ that simply halves its
  1084. argument is clearly monoidal.  This is a ``speedup'' functor that
  1085. allows one to pass to a world where everything happens twice as fast.
  1086. In fact from $F(a+b)=F(a)+F(b)$ and $F(0)=0$ we infer that the linear
  1087. speedups and slowdowns and their negations (time reversals) are the
  1088. only functors, and thus we have $\R^\R\cong\R$.  The $\infty$ and
  1089. $-\infty$ speedups are included, and their range in each case is
  1090. isomorphic to the noncartesian closed ordinal $\three'$ with the
  1091. convention that $0\otimes\infty=0=0\otimes-\infty$.
  1092. (3) We leave it to the reader to verify that $\two^\two\cong\two$
  1093. with the constant functor corresponding to 1 as always.
  1094. \def\hfdot{\mkern6mu\cdot\mkern6mu}
  1095. %\def\item#1#2\enditem{\hfil\break\kern\parindent\llap{#1}{\advance\hsize by-\parindent\vtop{#2}}}
  1096. \section{Enriched Categories and the ! Operator}
  1097. We now introduce the basic notions of enriched categories.  Our hope is
  1098. that these will be made more accessible via definitions that are not
  1099. only close at hand but presented from the same perspective as the
  1100. applications.  Enriched categories or $V$-categories are treated
  1101. briefly by Arbib and Manes \cite{AM} and exhaustively and precisely by
  1102. Kelly \cite{Kel}.  Section I-8 of Mac~Lane also touches on them,
  1103. without calling them such.  As far as we are aware ours is the first
  1104. proposed engineering application of Lawvere's vision \cite{Law} of
  1105. enriched categories as a combined generalized metric and logic.
  1106. \subsection{\D-categories}
  1107. The essence of an enriched category may be found in an ordinary
  1108. category $C$.  Write $\d(u,v)$ for the set of morphisms from $u$ to
  1109. $v$.  Associated with each triple $u,v,w$ of objects of $C$ is a
  1110. function $m_{uvw}:\d(u,v)\times\d(v,w)\to\d(u,w)$ defining
  1111. composition.  And to each object $u$ there is a function
  1112. $j_u:\{\cdot\}\to\d(u,u)$ picking out the identity element
  1113. $1_u\in\d(u,u)$.
  1114. We pass from this account of an ordinary category $C$ to the notion of
  1115. a category $C$ {\it enriched in} $\D$, or $\D$-category, by requiring
  1116. each $\d(u,v)$ to be an object of $\D$ instead of a set, and each
  1117. $m_{uvw}$ and $j_u$ be a morphism of $\D$ instead of a function.  The
  1118. class of objects of $C$ do not participate in this passage: the objects
  1119. of $C$ remain a class.  A functor $F:A\to B$ participates partially
  1120. in this passage:  when we view it as the $\D$-functor $F:A\to B$, its
  1121. object part remains unchanged but its action on morphisms, viewed for
  1122. each pair $uv$ of objects of $A$ as a function
  1123. $F_{uv}:\d^A(u,v)\to\d^B(F(u),F(v))$, becomes a morphism of $\D$
  1124. between homobjects $\d^A(u,v)$ and $\d^B(F(u),F(v))$ of $A,B$
  1125. respectively.
  1126. From this viewpoint, ordinary categories and functors between them are
  1127. $\Set$-categories and $\Set$-functors, that is, categories and functors
  1128. enriched in $\Set$.
  1129. {\bf Definition.} A \D-{\it category} $A=(V,\d,m,j)$, or
  1130. {\it category enriched in} \D, consists of a set $V$,
  1131. a function $\d:V^2\to\ob(\D)$, and
  1132. families of morphisms of \D, namely compositions
  1133. $m_{uvw}:\d(u,v)\otimes\d(v,w)\to\d(u,w)$ and
  1134. identities $j_u:I\to\d(u,u)$,
  1135. such that for all objects $u,v,w$ in $V$ the following diagrams commute.
  1136. These diagrams express associativity of composition, and the left
  1137. and right identity laws, explained below.
  1138. $$\commdiag
  1139. {(\d(u,v)\otimes \d(v,w))\otimes \d(w,x) &\rTo{\alpha_{\d(u,v)\d(v,w)\d(w,x)}}{}\across 3 & \d(u,v)\otimes
  1140. (\d(v,w)\otimes \d(w,x))\cr \dTo{}{m_{uvw}\otimes1} & & & &\dTo{1\otimes m_{vwx}}{}\cr
  1141. \d(u,w)\otimes \d(w,x)  &\rTo{m_{uwx}}{} & \d(u,x) & \lFrom{m_{uvx}}{} &\d(u,v)\otimes \d(v,x)\cr
  1142. $$\commdiag
  1143. {I\otimes \d(u,v)&\rTo{\lambda_{\d(u,v)}}{}       &\d(u,v)&\lFrom{\rho_{\d(u,v)}
  1144. }{}   &\d(u,v)\otimes I\cr
  1145. \dTo{}{j_u\otimes 1}&               &\vEq{}{}&               &\dTo{1\otimes j_v}{}\cr
  1146. \d(u,u)\otimes \d(u,v)&\rTo{m_{uuv}}{}&\d(u,v)&\lFrom{m_{uvv}}{}&\d(u,v)\otimes
  1147. \d(v,v)\cr
  1148. For $\D=\two$ the diagrams expressing the associativity and identity
  1149. laws hold vacuously since $\D$ is an ordered set.  Thus composition and
  1150. identity become
  1151. $$\eqalign
  1152. {m_{uvw}:&u\le v~\land~ v\le w~~\to~~u\le w\cr
  1153. j_u:&u\le u \cr}
  1154. expressing respectively transitivity and reflexivity.  Thus
  1155. \two-categories (categories enriched in \two, as opposed to
  1156. 2-categories which here are \Cat-categories) are just preorders.
  1157. For $\D=\R\op$, also an ordered set, we again may ignore the associativity and
  1158. identity laws.  Here we get
  1159. $$\eqalign
  1160. {m_{uvw}:&d(u,v)+d(v,w)\ge d(u,w)\cr
  1161. j_u:&0\ge d(u,u)\cr
  1162. %In this case $m$ expresses the triangle inequality while $j$ forces
  1163. %$\d(u,u)=0$, as there are no negative distances.  Thus $\R\op$-categories are
  1164. %what we shall call premetric spaces (Lawvere calls them generalized
  1165. %metric spaces), lacking the other two Fr\'echet conditions
  1166. %$\d(u,v)=\d(v,u)$ and $\d(u,v)=0$ implies $u=v$.  This example supports
  1167. %a more informative notion of concurrent behavior than preorders, since
  1168. %now the {\em delay} between two events can be indicated in addition to their
  1169. %precedence relation.
  1170. For $\D=\Cat$ we obtain ordinary 2-categories, along the same lines as
  1171. for $\D=\Set$ but with the addition of 2-cells between morphisms of
  1172. the same homset.
  1173. \subsection{\D-functors}
  1174. {\bf Definition}.  A \D-{\it functor} $F:A\to B$ where $A$ and $B$
  1175. are {\D}-categories consists of a function $F:V_A\to V_B$ between object
  1176. sets together with a family $F_{uv}:\d_A(u,v)\to \d_B(Fu,Fv)$
  1177. of morphisms between homobjects satisfying the following conditions
  1178. stating that compositions and identities are preserved.
  1179. $$\vbox{$\commdiag
  1180. {\d_A(u,v)\otimes \d_A(v,w)&\rTo{m_{uvw}}{}&\d_A(u,w)\cr
  1181. \dTo{F_{uv}\otimes F_{vw}}{}&        &\dTo{F_{uw}}{}\cr
  1182. \d_B(Fu,Fv)\otimes \d_B(Fv,Fw)&\rTo{m_{Fu,Fv,Fw}}{}&\d_B(Fu,Fw)\cr
  1183. \hfill\commdiag
  1184. {I&\rTo{j_u}{}&\d_A(u,u)\cr
  1185. \vEq{}{}&&\dTo{F_{uu}}{}\cr
  1186. I&\rTo{j_{Fu}}{}&\d_B(Fu,Fu)\cr
  1187. }$}$$
  1188. The elements of a $\D$-functor are depicted on the left of the following
  1189. figure, and compose in the obvious way as shown on the right.
  1190. $$\commdiag
  1191. {       u & \rImplies{\d_A(u,v)}{}  & v\cr
  1192. \dMapsto{F}{} & \dTo{F_{uv}}{} &\dMapsto{F}{}\cr
  1193. \noalign{\vskip5pt}
  1194.         Fu & \rImplies{\d_B(Fu,Fv)}{} &Fv\cr
  1195.  ~~~~~~~~
  1196. \commdiag
  1197. {       u & \rImplies{\d_A(u,v)}{}  & v\cr
  1198. \dMapsto{F}{} & \dTo{F_{uv}}{} &\dMapsto{F}{}\cr
  1199. \noalign{\vskip5pt}
  1200.         Fu & \rImplies{\d_B(Fu,Fv)}{} &Fv\cr
  1201. \dMapsto{G}{} & \dTo{G_{Fu,Fv}}{}   &\dMapsto{G}{}\cr
  1202. \noalign{\vskip5pt}
  1203.        GFu & \rImplies{\d_C(GFu,GFv)}{} & GFv\cr
  1204. It can be seen that \two-functors are monotone functions, \R-functors
  1205. and $\R\op$-functors are expanding and contracting maps respectively,
  1206. and \Set-functors are ordinary functors.  In our computational
  1207. application a \D-functor is an event map which maintains all temporal
  1208. constraints, though the result may have more constraints than the
  1209. source.
  1210. \subsection{Enrichment as a Function}
  1211. We now define the object part of the functor $-!:\SSM\to\SSM$.  Given a
  1212. semiconcrete monoidal $\D$ define $\D!$ to be the category {\D-\Cat} of
  1213. small categories enriched in $\D$.
  1214. $\D!$ is symmetric monoidal as follows \cite{EK66a}.  The tensor product
  1215. of two $\D$-categories $A$ and $B$ is defined to have as objects the
  1216. cartesian product $V_{A} \times V_{B}$, and homobjects
  1217. $$\d((u,v),(u',v')) = \d_{A}(u,u') \otimes_\D \d_{B}(v,v').$$ The
  1218. symmetry of $\D$ ensures that appropriate composition morphisms can be
  1219. defined and that $\D!$ is symmetric to boot.  The corresponding unit
  1220. $I$ is the one-object category with homobject
  1221. $\d_{I}(\cdot,\cdot)=I_\D$.
  1222. To make $\D!$ semiconcrete we define the forgetful functor
  1223. $U_{\D!}:\D!\to\Set$ mapping each $\D$-category $A$ to its underlying
  1224. set $V_A$ of objects and each $\D$-functor to its object map.
  1225. $U_{\D!}$ is monoidal by the above definition of $\otimes$ for $\D!$.
  1226. In our application $U$ yields the event set $U(b)$ of a behavior $b$.
  1227. We summarize the above as follows.
  1228. \begin{lemma}
  1229. If $\D$ is an object of $\SSM$ then so is $\D!$.
  1230. \end{lemma}
  1231. \subsection{Enrichment as a Functor}
  1232. We now define the action of ! on morphisms of $\SSM$.
  1233. \def\Fcat{{F_{\hbox{cat}}}}
  1234. {\bf Definition}
  1235. Given a monoidal functor $(F,\tau,t):\D\to \E$, define the functor
  1236. $(F,\tau,t)!=(F!,\tau!,t!):\D!\to\E!$ as follows:
  1237. $F!$ takes a $\D$-category $A$ to the $\E$-category $F!A=(V,\d,m,j)$
  1238. defined by
  1239. $$\eqalign{V        &= V_A  {\rm ~~~~(that~is,~~} U_{\D!}=U_{\D'!}F!) \cr
  1240. \d(u,v)  &= F(\d_A(u,v))\cr
  1241. m_{uvw}  &= F(m^{A}_{uvw})\tau_{\d_A(u,v)\d_A(v,w)}\cr
  1242. j_u      &= F(j^A_u)t\cr
  1243. $F!$ takes a \D-functor $G:A\to B$, to that $\E$-functor $F!G$ which
  1244. has the same object function and takes $(F!G)_{uv}$ to $F(G_{uv})$.
  1245. Thus $F!$ acts only on the distances within a behavior, and on the
  1246. ``distance comparison'' part of a morphism of behaviors.
  1247. For $\D$-categories $A$ and $B$ and objects $u$ and $u'$ or $A$, and
  1248. $v$ and $v'$ of $B$, define $$(\tau!)_{(u,v)(u',v')} =
  1249. \tau_{\d_A(u,u'),\d_B(v,v')}.$$
  1250. By the definition of $F!$, $F!I_{\D!}$ is an $\E$-category with a
  1251. single object.  Thus there is a unique possible object map for
  1252. $t!:I_{\E!}\to F!I_{\D!}$.  $t!$ on homobjects must be a map from
  1253. $I_\E\to FI_\D$; define this map to be $t$.
  1254. \begin{lemma}
  1255. If $(F,\tau,t):\D\to\E$ is a morphism of $\SSM$ then so is
  1256. $(F!,\tau!,t!):\D!\to\E!$.
  1257. \end{lemma}
  1258. We omit the straightforward, though tedious, proof.
  1259. Finally, by checking that $!$ preserves composition and identities, we
  1260. obtain the following.
  1261. \begin{theorem}
  1262. ! is an endofunctor on $\SSM$.
  1263. \end{theorem}
  1264. %\subsection{Enrichment as a Functor}
  1265. %We now define the action of ! on morphisms of $\SSM$.
  1266. %\def\Fcat{{F_{\hbox{cat}}}}
  1267. %{\bf Definition}
  1268. %Given a monoidal functor $F:\D\to \D'$, define the functor
  1269. %$F!:\D!\to\D'!$ as follows:
  1270. %For any \D-category $A$, we obtain the $\D'$-category $F!A=(V,\d,m,j)$ as
  1271. %$$\eqalign{V        &= V_A  {\rm ~~~~(that~is,~~} U_{\D!}=U_{\D'!}F!) \cr
  1272. %           \d(u,v)  &= F(\d_A(u,v))\cr
  1273. %           m_{uvw}  &= F(m^{A}_{uvw})\tau_{\d_A(u,v)\d_A(v,w)}\cr
  1274. %           j_u      &= F(j^A_u)t\cr
  1275. %For any \D-functor $G:A\to B$, we obtain a $\D'$-functor $F!G$ by
  1276. %using the same object function and by taking $(F!G)_{uv} =
  1277. %F(G_{uv})$.  Thus $F!$ acts only on the distances within a behavior, and
  1278. %on the ``distance comparison'' part of a morphism of behaviors.
  1279. %\begin{lemma}
  1280. %If $F:\D\to\D'$ is a morphism of $\SSM$ then so is $F!:\D!\to\D'!$.
  1281. %\end{lemma}
  1282. %We omit the straightforward proof.
  1283. %From these two lemmas we obtain the following.
  1284. %\begin{theorem}
  1285. %! is an endofunctor on $\SSM$.
  1286. %\end{theorem}
  1287. \subsection{Examples}
  1288. (1) Section 2 contains a figure illustrating the example
  1289. $(a;^3b)\otimes(c;^2d)$ of orthocurrence.
  1290. %(1)  We saw in Section 2 the example $010\otimes TR$ of a stream $010$
  1291. %of three messages flowing along a transmit-receive channel $TR$.  This
  1292. %example was located in $\Pom$.  If we relocate it to $\R\op!$ (ignoring
  1293. %labels) we may talk about upper bounds on delay.  For example
  1294. %$(0;^21;^30)\otimes(T;^7R)$ specifies a delay of at most 2 units between
  1295. %the first two messages and 3 between the last two, compounded with a
  1296. %delay of 7 units along the channel.  Pairs $u,v$ of events without a
  1297. %chain of edges from $u$ to $v$ are presumed to have an edge labeled
  1298. %$\infty$, corresponding to no constraint.
  1299. %$$\commdiag{
  1300. %0 & \rTo{2}{} & 1 & \rTo{3}{} & 0\cr
  1301. %\hskip1em \otimes \hskip1em
  1302. %\commdiag{
  1303. %T\cr
  1304. %\dTo{7}{}\cr
  1305. %R\cr
  1306. %\hskip2em = \hskip2em
  1307. %\commdiag{
  1308. %(0,T)& \rTo{2}{} & (1,T)     & \rTo{3}{} & (0,T) \cr
  1309. %\dTo{7}{}&       & \dTo{7}{} &           & \dTo{7}{} \cr
  1310. %(0,R)& \rTo{2}{} & (1,R) & \rTo{3}{} & (0,R) \cr
  1311. The triangle inequality requires the upper bounds on diagonals across
  1312. squares and rectangles to be at most the sum of the bounds encountered
  1313. along any path around the sides, e.g. 5 from $ac$ to $bd$.  This is
  1314. exactly the effect obtained by defining tensor product of spaces
  1315. (enriched categories) in terms of the addition (tensor product) of the
  1316. underlying metric.  Had we defined tensor product of spaces in terms of
  1317. ordinary product in the metric (min), we obtain the next example,
  1318. ordinary product of spaces.
  1319. (2) Consider the monoidal functor $F:\R\to\two$ which takes $-\infty$
  1320. to 0 and all else to 1.  Application of $F!$ to each of the illustrated
  1321. examples of Section 2 with vertex labels deleted to make them objects
  1322. of $\R!$, produces the corresponding object of $\two!$, a poset, in
  1323. effect by erasing the edge labels.
  1324. \subsection{Continuity of !}
  1325. We now show that ! enjoys certain continuity properties.  These will be
  1326. used in section~\ref{sec:langs} to show that all KL kinds are
  1327. bicomplete and closed, which in turn ensures that PSL is well-defined.
  1328. \begin{proposition} If {\D} has an initial object $0$ and a natural
  1329. isomorphism $A\otimes 0\cong 0$ then {\D!} has coproducts.
  1330. \end{proposition}
  1331. The natural isomorphism $A\otimes 0 \cong 0$ always exists when $\D$ is
  1332. closed.
  1333. A discrete category is a copower in $\Cat$ of 1, that is, the coproduct
  1334. of a set of one-object categories, yielding the following similar
  1335. result:
  1336. \begin{proposition}
  1337. If {\D} has an initial object $0$ and $0\otimes A\cong 0\cong A\otimes 0$, 
  1338. then the forgetful functor $U_{\D!}:\D!\to\Set$ has a left adjoint
  1339. $D:\Set\to\D!$ taking a set $S$ to the corresponding {\rm discrete}
  1340. {\D}-category ($\d_{DS}(u,v)=I$ if $u=v$, 0 otherwise).  
  1341. \end{proposition}
  1342. The dual result to this, though not with a dual proof, is:
  1343. \begin{proposition}
  1344. If {\D} has a final object $1$, $U_{\D!}:\D!\to\Set$ has a right adjoint
  1345. $E:\Set\to\D!$ taking the set $X$ to the corresponding chaotic
  1346. (codiscrete) {\D}-category ($\d_{DS}(u,v)=1$ for all $u,v$).  
  1347. \end{proposition}
  1348. Meanwhile, for the case of general colimits we refer to a result of
  1349. \cite{BCSW}. 
  1350. \begin{theorem}
  1351. If {\D} is cocomplete and {\D} is closed then {\D!} is cocomplete.
  1352. \end{theorem}
  1353. There is also a similar but much easier result about limits.  PSL needs
  1354. limits for local product and hence local concatenation.
  1355. \begin{theorem}
  1356. If {\D} has limits of (small) type {\cal J}, then so does {\D!}.
  1357. \end{theorem}
  1358. If any one theorem could be considered at the heart of enriched
  1359. categories it is the following.  Kelly's proof (\cite{Kel} p.55, see
  1360. also Lawvere \cite{Law} p.153) is dauntingly formal, to which we offer
  1361. an informal counterpart.
  1362. \begin{theorem}
  1363. If \D\ is complete and closed then $\D!$ is closed.
  1364. \end{theorem}
  1365. \begin{proof}
  1366. The objects of the $\D$-category $C^B$ are of course just the
  1367. $\D$-functors from $B$ to $C$.  What is less obvious is the appropriate
  1368. homobject $\d_{C^B}(U,V)$ abstracting the homset of natural
  1369. transformations between any two $\D$-functors $U,V$ of $C^B$.  The
  1370. natural {\it and unnatural} transformations are given by $\prod_{b\in
  1371. B}\d_C(Ub,Vb)$; we seek its subobject $\int_{b\in B}\d_C(Ub,Vb)$ (an
  1372. {\it end} \cite{Mac} p.219) consisting of just the natural ones.
  1373. Now for $\D=\Set$ such a transformation $\tau$ determines, for all
  1374. $b,b'$, two functions $\rho_\tau,\sigma_\tau:\d_B(b,b')\to
  1375. \d_C(Ub,Vb')$, that is, two elements of $\d_C(Ub,Vb')^{\d_B(b,b')}$.
  1376. Here $\rho_\tau$ takes $f:b\to b'$ to $V(f)\circ\tau_b$, while
  1377. $\sigma_\tau$ takes the same $f$ to $\tau_{b'}\circ U(f)$.  But these
  1378. are just the two sides of the square
  1379. $$\commdiag{
  1380.     Ub         & \rTo{\tau_b}{}    & Vb         \cr
  1381.     \dTo{Uf}{} &                   & \dTo{Vf}{} \cr
  1382.     Ub'        & \rTo{\tau_{b'}}{} & Vb'        \cr
  1383. which must be equal for $\tau$ to be natural.  Encapsulating ``for all
  1384. $b,b'$'' as a product over $b,b'\in B$ and generalizing to arbitrary
  1385. $\D$ (formalized in Kelly's proof), we may therefore obtain the desired
  1386. homobject $\d_{C^B}(U,V)$ as the equalizer of
  1387. $$    \d_{C^B}(U,V) \commdiag{\rTo{}{}}
  1388.     \prod_{b\in B}\d_C(Ub,Vb)
  1389.     \commdiag{\rTo{\rho}{}\cr\rTo{}{\sigma}}
  1390.     \prod_{b,b'\in B}\d_C(Ub,Vb')^{\d_B(b,b')}.$$
  1391. This construction required an exponential, two products, and an
  1392. equalizer, for which it suffices that $\D$ be complete and closed.
  1393. \end{proof}
  1394. \section{Comma Categories and the $\comma$ Operator}
  1395. \def\arrow#1{\stackrel{#1}{\longrightarrow}}
  1396. The ! operator creates categories of spaces with distances between
  1397. pairs of points.  We wish to interpret the points as events and the
  1398. distances as temporal constraints on the events.  To complete this
  1399. interpretation we must have some way to say what type of event each
  1400. point represents.
  1401. Given a labeling alphabet, a set $\Sigma$, we label the underlying set
  1402. $U(p)$ of points of a space $p$ with a function $\mu:U(p)\to\Sigma$.
  1403. For $p$ a poset this is the notion of pomset or partially ordered
  1404. multiset as a labeled partial order.
  1405. Our framework can be simplified by dropping the assumption that
  1406. $\Sigma$ is a pure set and instead associating with the category
  1407. supplying $\Sigma$ a forgetful functor $V$ that strips off any
  1408. unwanted structure to reveal its underlying set $V(\Sigma)$.  Our
  1409. labeling function then becomes $\mu:U(p)\to V(\Sigma)$.
  1410. But this is what it means to be an object of the comma category
  1411. $(U{\downarrow}V)$.  Moreover the morphisms of this comma category from
  1412. $\mu:U(p)\to V(\Sigma)$ to $\mu':U(p')\to V(\Sigma')$, namely pairs of
  1413. maps $f:p\to p'$ and $t:\Sigma\to\Sigma'$ such that $V(t)\mu =
  1414. \mu'U(f)$, turn out to be just what we need.
  1415. \subsection{The Function $\comma$}
  1416. Given categories $\D$, $\E$ in $\SSM$ (i.e., both symmetric monoidal
  1417. equipped with functors $U:\D\to\Set$, $V:\E\to\Set$, respectively), we
  1418. define $\D\comma\E$ to be the comma category $\UV$.  Recall
  1419. that this is the category whose objects are triples $\<x,\mu,u>$
  1420. where $\mu:Ux\to Vu$, and whose morphisms are pairs $\<f,g>$ such
  1421. that the following square commutes:
  1422. $$\commdiag{
  1423.         Ux  & \rTo{\mu}{} & Vu  \cr
  1424.         \dTo{Uf}{} &   & \dTo{Vg}{} \cr
  1425.         Ux' & \rTo{\mu'}{} & Vu'.
  1426. %define $\D\comma\E$ to be the comma category $(\UV)$, that is, the
  1427. %subcategory of $\D\times\SSM^\to\times\E$ whose objects $\<x,\mu,u>$
  1428. %satisfy $\mu:Ux\to Vu$ and similarly whose morphisms $\<f:x\to
  1429. %x',s,g:u\to u'>$ have for $s$ the commuting square
  1430. %$$\commdiag{
  1431. %    Ux  & \rTo{\mu}{} & Vu  \cr
  1432. %    \dTo{Uf}{} &   & \dTo{Vg}{} \cr
  1433. %    Ux' & \rTo{\mu'}{} & Vu'.
  1434. %In the following diagrams representing such morphisms $\<f:x\to
  1435. %x',s,g:u\to u'>$ we give only $s$, $f$ and $g$ being inferrable from $s$.
  1436. $\D\comma\E$ can be made symmetric monoidal by defining the tensor
  1437. product
  1438.     \commdiag{
  1439.     Ux  & \rTo{\mu}{} & Vu\cr
  1440.     \dTo{Uf}{} &   & \dTo{Vg}{} \cr
  1441.     Ux' & \rTo{\mu'}{} & Vu' }
  1442.     ~~~~~~~~\otimes~~~~~~~~
  1443.     \commdiag{
  1444.     Uy  & \rTo{\nu}{} & Vv \cr
  1445.     \dTo{Uh}{} &   & \dTo{Vk}{} \cr
  1446.     Uy' & \rTo{\nu'}{} & Vv'}
  1447. to be
  1448. \commdiag{
  1449. U(x\otimes y) & \lTo{\tau_U}{\congh} & Ux\times Uy & \rTo{\mu\times\nu}{} & Vu\times Vv
  1450. & \rTo{\tau_V}{\congh} & V(u\otimes v)\cr
  1451. \dTo{}{U(f\otimes h)} &
  1452. & \dTo{Uf\times Uh}{} & & \dTo{Vg\times Vk}{} & &  \dTo{V(g\otimes k)}{}
  1453. U(x'\otimes y') & \lTo{\tau_U}{\congh} & Ux'\times Uy' & \rTo{\mu'\times\nu'}{} & Vu\times Vv
  1454. & \rTo{\tau_V}{\congh} & V(u\otimes v)
  1455. The unit object of $D\comma \E$ is taken to be
  1456. $I_{\textstyle\D\comma\E}=\<I_{\D},h,I_{\E}>$, where $h=t_Vt_U^{-1}$
  1457. $$\commdiag{UI_{\D}&\lFrom{t_U}{\congh}&1&\rTo{t_V}{\congh}&VI_{\E}}$$
  1458. (In fact one may use these definitions for $\otimes$ and $I$ in the
  1459. case where $V$ is only lax monoidal; $U$ must still be strong monoidal).
  1460. Now we must show that this product is associative,
  1461. symmetric, and $I_{\textstyle\D\comma\E}$ is in fact an identity.  We outline
  1462. briefly the definition of the associativity natural transformation
  1463. $\alpha_{\textstyle\D\comma\E}$.  (Other required natural
  1464. transformations are defined similarly.)
  1465. We take
  1466. $\alpha_{{\textstyle\D\comma\E},\<x,\mu,u>\<x',\mu',u'>\<x'',\mu'',u''>}$
  1467. to be $\<\alpha_{\D,xx'x''},\alpha_{\E,uu'u''}>$.  This is a
  1468. well-defined morphism because $V(\alpha)(\mu\otimes(\mu' \otimes
  1469. \mu''))$ is equal to $((\mu \otimes \mu')\otimes \mu'')U(\alpha)$.
  1470. This requirement follows from properties of monoidal functors and
  1471. natural transformations.  The coherence conditions on
  1472. $\alpha_{\textstyle\D\comma\E}$ are established similarly.
  1473. We make $\D\comma\E$ semiconcrete by using the functor 
  1474. $$\commdiag{\D\comma\E&\rTo{\pi_0}{}&\D&\rTo{U}{}&\Set}$$
  1475. This makes the underlying sets of objects of $\D\comma\E$ those of
  1476. objects of $\D$.  If the objects of $\D$ are spaces while those of
  1477. $\D\comma\E$ are labeled spaces, the underlying sets of the latter are
  1478. the same as those of the former, i.e. the labels are ignored.
  1479. \subsection{$\comma$ as a Functor}
  1480. To complete the description of the functor $\comma$ we describe its
  1481. action on morphisms (i.e., functors) $F,G$ of $\SSM$.  
  1482. Recall that we impose the condition $U=U'F$ in the definition of the
  1483. morphisms $F$ of $\SSM$ as well as the condition that $F$ be strong monoidal.
  1484. The functor $F\comma G:\SSM~^2\to\SSM$ acts thus:
  1485. $$\commdiag{
  1486. \D        & \rTo{U}{}  & \Set     & \lFrom{V}{}  & \E        \cr
  1487. \dTo{}{F} &            & \vEq{}{} &              & \dTo{G}{} \cr
  1488. \D'       & \rTo{U'}{} & \Set     & \lFrom{V'}{} & \E'       \cr
  1489. \rMapsto{\comma}{}
  1490. \commdiag{
  1491. \D\comma\E        & \rTo{U\pi_0}{}   & \Set      \cr
  1492. \dTo{}{F\comma G} &              & \vEq{}{}  \cr
  1493. \D'\comma\E'      & \rTo{U'\pi_0'}{} & \Set      \cr
  1494. where $\pi_0$ projects onto $\D$ as before and $F\comma G$ takes each
  1495. morphism $\<f,g>$ of $\D\comma\E$ to $\<Ff,Gg>=\<U'Ff,V'Gg>$.
  1496. %morphism $\<f,s,g>$ of $\D\comma\E$ to $\<Ff,s,Gg>$ as shown, where
  1497. %$s$ denotes the innermost square of the following figure, and hence
  1498. %also the larger rectangle it is embedded in.
  1499. $$\commdiag{
  1500. U'Fx  & \hEq{}{} & Ux  & \rTo{\mu}{} & Vu  & \hEq{}{} & V'Gu\cr
  1501. \dTo{U'Ff}{}&&\dTo{Uf}{}&&\dTo{}{Vg}&&\dTo{}{V'Gg}\cr
  1502. U'Fx' & \hEq{}{} & Ux' & \rTo{\mu'}{} & Vu' & \hEq{}{} & V'Gu'\cr
  1503. We now need to verify that $F\comma G$ is strong monoidal.
  1504. This involves exhibiting a morphism
  1505. $\tau_{\textstyle F\comma G}:(F\comma G)\<x,\mu,u>\otimes(F\comma G)\<y,\nu,v>\to(F\comma G)(\<x,\mu,u>\otimes\<y,\nu,v>)$ of $\D'\comma\E'$
  1506. for any pair $\<x,\mu,u>$, $\<y,\nu,v>$ both in $\D\comma\E$,
  1507. namely that given by pairing $\tau_F:Fx\times Fy\to F(x\otimes y)$ 
  1508. with the corresponding $\tau_G$.
  1509. That this is indeed a morphism of $\D'\comma\E'$ depends on the 
  1510. commutativity of the squares appearing in
  1511. $$\commdiag{
  1512. U'(Fx\otimes Fy)& \lFrom^{\tau_{U'}}_\cong & U'Fx\times U'Fy &&
  1513. V'Gu\times V'Gv & \rTo^{\tau_{V'}}_\cong & V'(Gu\otimes Gv) \cr
  1514. \VerticalMapExtraDepth14ex \dTo&& \vEq&
  1515. & \vEq&&\VerticalMapExtraDepth14ex \dTo\cr
  1516. U'\tau_F~\cong~~~~&& Ux\times Uy &
  1517.  ~~~~\stackrel{\mu\times\nu}{\longrightarrow}~~~~
  1518. &Vu\times Vv && ~~~~\cong~V\tau_G\cr
  1519. &&\dTo^{\tau_U}_\cong && \dTo^\cong_{\tau_V}&&\cr
  1520. U'F(x\otimes y)& \hEq & U(x\otimes y) &
  1521. &V(u\otimes v) & \hEq & V'G(u\otimes v)\cr
  1522. which follows from the $\tau_U=(U'\tau_F)\tau_{U'}$ condition in the 
  1523. definition of $\SSM$.  
  1524. That the morphisms $\tau_{\textstyle F\comma G}$ constitute a natural
  1525. transformation and that they satisfy the appropriate coherence
  1526. conditions directly follows from the corresponding naturality and
  1527. coherence conditions on $\tau_F$ and $\tau_G$.
  1528. \subsection{Continuity of $\comma$}\label{sec:comfunctors}
  1529. \def\J{J}
  1530. We now wish to lift limits and colimits that exist in the
  1531. component categories to comma categories defined from them.  To do this
  1532. we must deal with functors into comma categories.
  1533. The following lemma can be applied whenever functors into a comma
  1534. category are to be defined.  It states that defining a functor from a
  1535. category $\J$ into $(U{\downarrow}V)$, where $U:\A\to \C$ and $V:\B\to \C$,
  1536. is essentially equivalent to defining functors $F:\J\to \A$ and
  1537. $G:\J\to \B$ and a natural transformation from $UF$ to $VG$.
  1538. Furthermore, natural transformations between such functors are
  1539. essentially equivalent to a pair of natural transformations satisfying
  1540. a certain commutativity condition.
  1541. For any functor $F:\X\to\Y$ 
  1542. denote by $F^\J$ the functor from the functor category
  1543. $\X^\J$ to $\Y^\J$ defined by ``left-composition with $F$''.  
  1544. Then we have:
  1545. \begin{lemma}\label{lem:functorcomma}
  1546. $\displaystyle (\UV)^\J \cong (U^\J \darrow V^\J).$
  1547. \end{lemma}
  1548. \begin{proofo}  
  1549. The comma category $\UV$ has the projections
  1550. $\pi_0:\UV\to\A$ and $\pi_1:\UV\to\B$, and defines a natural transformation
  1551. $\nu:U\pi_0\to V\pi_1$.  (In fact this is an alternative definition
  1552. of the concept of a comma category.)
  1553. Hence, given a functor, $F:\J \to \UV$, we can define
  1554. functors $\pi_0F:\J\to\A$ and $\pi_1F:\J\to\B$, and a natural transformation
  1555. $\nu\circ F:U\pi_0F\to V\pi_1F$.  This defines an object of the
  1556. comma category $(U^\J \darrow V^\J)$.  It is routine to extend this
  1557. mapping to a functor 
  1558. $\displaystyle (\UV)^\J \to (U^\J \darrow V^\J)$ and show that it
  1559. is an isomorphism of categories.
  1560. \end{proofo}  
  1561. We can use this lemma to prove a basic result about limits in comma
  1562. categories.  (Note: Although this result is purely categorical we are
  1563. not aware of its having appeared in any textbook.  A marginally weaker
  1564. form was proven by Tarlecki in a rather different context~\cite{Tar85}
  1565. and Mac~Lane proved a special case as part of his proof of Freyd's
  1566. Adjoint Functor Theorem~\cite[page 123]{Mac}.)
  1567. \begin{theorem}\label{thm:comma}
  1568. Let $U:\A\to\C$ and $V:\B\to\C$ be functors, and $\J$ be a category.
  1569. If $\A$ and $\B$
  1570. have all $\J$-limits and $V$ preserves $\J$-limits then the comma
  1571. category $(U\darrow V)$ has all $\J$-limits
  1572. \end{theorem}
  1573. \begin{proof}
  1574. Let $F:\J\to (U\darrow V)$ be an $\J$-diagram in $(U\darrow V)$.  Then by 
  1575. lemma~\ref{lem:functorcomma}, $F$ can
  1576. be considered as a triple, $\<F_1,\mu,F_2>$ where 
  1577. \begin{eqnarray*}
  1578. F_1:\J\to\A\\
  1579. F_2:\J\to\B\\
  1580. \mu:UF_1\to VF_2
  1581. \end{eqnarray*}
  1582. Since $\A$ and $\B$ have $\J$-limits, both $F_1$ and $F_2$ have limits.
  1583. Denote their limiting cones by $\lambda^1:\lim F_1\to F_1$ and 
  1584. $\lambda^2:\lim F_2 \to F_2$ respectively.
  1585. Since $V$ preserves $\J$-limits, $V(\lim F_2)$ is a limit of $VF_2$,
  1586. with limiting cone $V\lambda^2$.
  1587. Now the composite natural transformation
  1588. U(\lim F_1)\to{U\lambda^1} UF_1 \to{\mu} VF_2
  1589. is a cone from $U(\lim F_1)$ to $VF_2$, so by the universal property of
  1590. limits there exists a unique arrow $p$ such that the following diagram
  1591. of functors and natural transformations commutes.  (Note: in this and
  1592. the following diagrams an object of $C$ represents the constant functor
  1593. to that object and an arrow of $C$ represents the ``constant''
  1594. natural tranformation between such constant functors.)
  1595. \begin{center}\begin{picture}(125,65)
  1596.         \put(55,51){$\scriptstyle U\lambda^1$}
  1597. \put(0,45){$U(\lim F_1)$}\put(45,48){\vector(1,0){45}}\put(93,45){$UF_1$}
  1598. \put(9,25){$\scriptstyle p$}\put(15,42){\vector(0,-1){29}}
  1599. \put(105,42){\vector(0,-1){29}}\put(108,25){$\scriptstyle \mu$}
  1600.         \put(55,6){$\scriptstyle V\lambda^2$}
  1601. \put(0,0){$V(\lim F_2)$}\put(45,3){\vector(1,0){45}}\put(93,0){$VF_2$}
  1602. \end{picture}\end{center}
  1603. Now we claim that $\<\lim F_1,p,\lim F_2>$ is the limit of $F$, and that
  1604. the limiting cone is defined by the pair of natural transformations
  1605. $\<\lambda^1,\lambda^2>$.
  1606. For suppose we have an object, $\<A,f,B>$ and a cone
  1607. $\kappa:\<A,f,B>\to F$.  $\kappa$ can be considered as a pair 
  1608. of natural transformations, $\kappa^1:A\to F_1$ and 
  1609. $\kappa^2:B\to F_2$.  Since $F_1$ and $F_2$ have limits there
  1610. must exist unique maps $a:A\to \lim F_1$ and $b:B\to \lim F_2$
  1611. which factor $\kappa^1$ and $\kappa^2$ through $\lambda^1$ and
  1612. $\lambda^2$ respectively.
  1613. Consider the following diagram of natural transformations.
  1614. \begin{center}\begin{picture}(250,130)
  1615.              \put(120,116){$\scriptstyle f$}
  1616. \put(30,110){$UA$}\put(55,113){\vector(1,0){130}}\put(190,110){$VB$}
  1617. \put(47,102){\vector(1,-2){16}}\put(60,82){$\scriptstyle Ua$}
  1618. \put(186,102){\vector(-1,-2){16}}\put(160,82){$\scriptstyle Vb$}
  1619.          \put(110,61){$\scriptstyle p$}
  1620. \put(50,55){$U(\lim F_1)$}\put(97,58){\vector(1,0){37}}\put(145,55){$V(\lim F_2)$}
  1621. \put(63,50){\vector(-1,-2){16}}\put(60,25){$\scriptstyle U\lambda^1$}
  1622. \put(170,50){\vector(1,-2){16}}\put(160,25){$\scriptstyle V\lambda^2$}
  1623.              \put(110,6){$\scriptstyle \mu$}
  1624. \put(25,0){$UF_1$}\put(55,3){\vector(1,0){130}}\put(185,0){$VF_2$}
  1625. \put(15,55){$\scriptstyle U\kappa^1$}\put(35,102){\vector(0,-1){85}}
  1626. \put(203,55){$\scriptstyle V\kappa^2$}\put(200,100){\vector(0,-1){85}}
  1627. \end{picture}\end{center}
  1628. The outer square of this diagram commutes because $\kappa$ is  an
  1629. arrow in the comma category.  The two inner triangles commute by definition
  1630. of $a$ and $b$.  The lower inner square commutes by definition of $p$.
  1631. Now we wish to show that the upper inner square commutes.  We do this
  1632. by showing that the cone $(V\lambda^2).(Vb).f$ is identical to the cone
  1633. $(V\lambda^2).p.(Ua)$.  Since 
  1634. there must be a {\em unique\/} arrow which
  1635. factors this cone through the limiting cone $V\lambda^2$, we can conclude
  1636. that the arrows $(Vb).f$ and $p.(Ua)$ must be identical.  This is the
  1637. required commutativity condition.  But we have
  1638. $$\begin{array}{rcll}
  1639. (V\lambda^2).(Vb).f &=& (V\kappa^2).f &\ \hbox{definition of $b$}\\
  1640.             &=& \mu.(U\kappa^1)&\ \hbox{outer square commutes}\\
  1641.             &=& \mu.(U\lambda^1).(Ua)&\ \hbox{definition of $a$}\\
  1642.             &=& (V\lambda^2).p.(Ua)&\ \hbox{lower square commutes}
  1643. \end{array}$$
  1644. This proves the required commutativity, which shows that $\<a,b>$ is 
  1645. an arrow in $\UV$ and that it factors $\kappa$.  That $\<a,b>$ is
  1646. the unique such arrow follows from the fact that $a$ must factor
  1647. $\kappa^1$ through the limiting cone $\lambda^1$, so $a$ is the
  1648. unique such arrow.  Similarly, $b$ must factor $\kappa^2$
  1649. through $\lambda^2$, and so is unique.
  1650. \end{proof}
  1651. Note that the proof gives an explicit construction of limits in a 
  1652. comma category when the conditions of the theorem are satisfied.
  1653. The same technique allows us to construct colimits:
  1654. \begin{corollary}
  1655. If $\A$ and $\B$ have all $\J$-colimits and $U$ preserves $\J$-colimits then 
  1656. $\UV$ has all $\J$-colimits.
  1657. \end{corollary}
  1658. \begin{proof}
  1659. For any functor $U:\A \to C$, let $U\op$
  1660. be the corresponding functor $U\op: \A\op \to C\op$.  Observe that
  1661.     (U\darrow V)\op = (V\op\mathord{\darrow}U\op).
  1662. \end{proof}
  1663. With rather more work we may show that under appropriate conditions
  1664. $\UV$ is closed.
  1665. \begin{theorem}
  1666. Suppose that $\A$ and $\B$ are monoidal closed, and that $\C$ is monoidal.
  1667. Suppose further that $F:\A\to\C$ is a strong monoidal functor, that
  1668. $G:\B\to\C$ is (lax) monoidal, and that $\A$ has all pullbacks.  If $F$
  1669. admits a right adjoint, $R$, then $F\darrow G$ is closed.
  1670. \end{theorem}
  1671. \noindent{\it Proof Outline}:  The proof is in three stages.  Under
  1672. the assumptions of the theorem we show:
  1673. \begin{enumerate}
  1674. \item $R$ is monoidal and hence that $RG$ is monoidal;
  1675. \item $F\darrow G$ is isomorphic to $1_\A\darrow RG$; and finally
  1676. \item For any monoidal functor $H:\A\to\B$, $1_\A\darrow H$ 
  1677.         is closed.
  1678. \end{enumerate}
  1679. We adopt the following notation.  Suppose that $F \dashv R$.  For any
  1680. arrow $g:FA\to B$ denote the adjoint transpose by $g^\sharp: A\to RB$.
  1681. Dually, denote the adjoint transpose of $f:A\to RB$ by $f^\flat:FA \to B$.
  1682. Observe that for appropriate arrows $f,g$ and $g'$ we have
  1683. \begin{eqnarray*}
  1684.     (g'g)^\sharp &=& (Rg')g^\sharp\\
  1685.     \bigl(g(Ff)\bigr)^\sharp &=& g^\sharp f.
  1686. \end{eqnarray*}
  1687. The dual results, $(ff')^\flat = (f^\flat)(Ff')$ and 
  1688. $\bigl((Rg')f\bigr)^\flat=g'f^\flat$ will also be useful.
  1689. We now proceed with the proofs of the three lemmas which prove the
  1690. theorem.
  1691. \begin{lemma}
  1692. Let $F:\A\to\C$ be strong monoidal and have a right adjoint, $R$.
  1693. Then $R$ is monoidal.
  1694. \end{lemma}
  1695. \begin{proof}
  1696. Let $\phi:FA\otimes FB \to F(A\otimes B)$ and $\widehat\phi: I \to FI$ be
  1697. the isomorphisms which make $F$ monoidal.
  1698. Define $\psi:RX\otimes RY \to R(X\otimes Y)$ to be the adjoint transpose
  1699. of the composite
  1700.     F(RX\otimes RY) \arrow{\phi^{-1}} FRX \otimes FRY \arrow{\epsilon\otimes\epsilon} X\otimes Y;
  1701. and $\widehat\psi:I\to RI$ to be $(\widehat\phi^{-1})^\sharp$.
  1702. To show that $\phi$ and $\widehat\phi$ make $R$ into a monoidal functor, we
  1703. must show that they satisfy the coherence conditions.  We give here the
  1704. proof of the associativity condition.  The proofs of the other two
  1705. conditions are similar.
  1706. $F$ is monoidal, so we know that the following commutes:
  1707. %                   phi*1                 phi
  1708. %   (FRX* FRY)*FRZ -------> F(RX*RY)*FRZ -------> F((RX*RY)*RZ)
  1709. %          |                                          |
  1710. %    alpha |                                          | F(alpha)
  1711. %          |                                          |
  1712. %          v        1*phi                 phi         v
  1713. %   FRX*(FRY*FRZ) -------> FRX*F(RY*RZ) -------> F(RX*(RY*RZ))
  1714. \begin{center}\setlength{\unitlength}{1.1pt}\begin{picture}(340,70)
  1715. \put(105,60){$\phi\otimes 1$} \put(230,60){$\phi$}
  1716. \put(0,50){$(FRX\otimes FRY)\otimes FRZ$}\put(105,53){\vector(1,0){20}}
  1717.     \put(130,50){$F(RX\otimes RY)\otimes FRZ$}
  1718.     \put(225,53){\vector(1,0){20}}
  1719.     \put(250,50){$F\bigl((RX \otimes RY) \otimes RZ\bigr)$}
  1720. \put(45,28){$\alpha$}\put(55,47){\vector(0,-1){35}}
  1721. \put(285,47){\vector(0,-1){35}}\put(290,28){$F\alpha$}
  1722. \put(105,10){$1 \otimes \phi$} \put(230,10){$\phi$}
  1723. \put(0,0){$FRX\otimes(FRY\otimes FRZ)$}\put(105,3){\vector(1,0){20}}
  1724.     \put(130,0){$FRX\otimes F(RY\otimes RZ)$}
  1725.     \put(225,3){\vector(1,0){20}}
  1726.     \put(250,0){$F\bigl(RX \otimes(RY \otimes RZ)\bigr)$}
  1727. \end{picture}\end{center}
  1728. Rearrange to obtain the equation
  1729. \alpha (\phi^{-1}\otimes 1) \phi^{-1} = (1\otimes \phi^{-1})\phi^{-1} F\alpha.
  1730. Compose both sides of the equation
  1731. with $\epsilon\otimes(\epsilon\otimes\epsilon)$.  Then the
  1732. left hand side of the new equation is:
  1733. \begin{eqnarray*}
  1734. \lefteqn{
  1735. \bigl(\epsilon\otimes(\epsilon\otimes\epsilon)\bigr)\alpha (\phi^{-1}\otimes 1)\phi^{-1}}\\
  1736. &=& \alpha (\psi^\flat \otimes \epsilon) \phi^{-1}\\
  1737. &=& \alpha ((\epsilon(F\psi)) \otimes \epsilon) \phi^{-1}\\
  1738. &=& \alpha (\epsilon\otimes\epsilon) \phi^{-1} F(\psi\otimes 1)\\
  1739. &=& \alpha \psi^\flat F(\psi\otimes 1)
  1740. \end{eqnarray*}
  1741. The right side of the new equation is
  1742. \begin{eqnarray*}
  1743. \lefteqn{\bigl(\epsilon\otimes(\epsilon\otimes\epsilon)\bigr) (1\otimes\phi^{-1}) \phi^{-1} (F\alpha)}\\
  1744. &=& (\epsilon \otimes \psi^\flat) \phi^{-1} (F\alpha)\\
  1745. &=& \bigl(\epsilon\otimes\bigl(\epsilon(F\psi)\bigr)\bigr)\phi^{-1}(F\alpha)\\
  1746. &=& (\epsilon\otimes\epsilon)\phi^{-1} F(1\otimes \psi) (F\alpha)\\
  1747. &=& \psi^\flat F(1\otimes \psi) (F\alpha)
  1748. \end{eqnarray*}
  1749. Apply $\sharp$ to both sides of the new equation and 
  1750. simplify using the properties of $\sharp$ to obtain the required condition
  1751. $$ (R\alpha) \psi (\psi\otimes 1) =
  1752.     \psi (1\otimes \psi) \alpha.
  1753. \end{proof}
  1754. \begin{lemma}
  1755. Let $R:\C\to \A$ be a right adjoint of $F$, considered as monoidal
  1756. functor as described in the previous lemma.
  1757. Under the conditions of the theorem $F\darrow G$ and $1_\A \darrow RG$
  1758. are isomorphic monoidal categories.
  1759. \end{lemma}
  1760. \begin{proof}
  1761. To each object $FA \arrow{f} GB$ associate the corresponding object
  1762. $A \arrow{f^\sharp} RGB$.  It is straightforward to show that this
  1763. correspondence can be extended to an isomorphism of categories.
  1764. Now we show that the tensor product of the two categories coincide.
  1765. Let $\gamma$ be the natural transformation $GB_1 \otimes GB_2 \to
  1766. G(B_1\otimes B_2)$.  Let $\phi$ be the natural isomorphism $FA_1 \otimes
  1767. FA_2 \to F(A_1 \otimes A_2)$.  Denote the corresponding transformation for
  1768. $R$ by $\psi$, recalling that
  1769. $\psi=((\epsilon\otimes\epsilon)\phi^{-1})^\sharp$.  Hence, the
  1770. transformation for the composite functor $RG$ is $(R\gamma)\psi$.
  1771. Consider two objects, $FA_1 \arrow{f_1} GB_1$ and $FA_2 \arrow{f_2} GB_2$.  
  1772. Applying $\sharp$ and then taking the tensor product in $1\darrow RG$
  1773. results in the composite arrow
  1774. A_1\otimes A_2\arrow{f_1^\sharp \otimes f_2^\sharp} RGB_1 \otimes RGB_2
  1775.     \arrow{(R\gamma)\psi} RG(B_1 \otimes B_2).
  1776. We want to show that this arrow is identical to the result of first
  1777. taking tensor product in $F\darrow G$ and then applying $\sharp$,
  1778. namely 
  1779.     (\gamma (f_1 \otimes f_2) \phi^{-1})^\sharp.
  1780. But we have
  1781. \begin{array}{ll}
  1782. (R\gamma)\psi(f_1^\sharp \otimes f_2^\sharp)\\
  1783. = (R\gamma) ((\epsilon \otimes \epsilon) \phi^{-1})^\sharp (f_1^\sharp \otimes f_2^\sharp) & \mbox{definition of $\psi$}\\
  1784. = \bigl(\gamma (\epsilon \otimes \epsilon) \phi^{-1} F(f_1^\sharp \otimes f_2^\sharp)\bigr)^\sharp & \mbox{properties of $\sharp$}\\
  1785. = \bigl(\gamma (\epsilon \otimes \epsilon) (F(f_1^\sharp) \otimes F(f_2^\sharp)) \phi^{-1} \bigr)^\sharp & \mbox{$\phi$ is natural}\\
  1786. = \bigl(\gamma (\epsilon F(f_1^\sharp) \otimes \epsilon F(f_2^\sharp)) \phi^{-1} \bigr)^\sharp \\
  1787. = \bigl(\gamma (f_1 \otimes f_2) \phi^{-1}\bigr)^\sharp,\\
  1788. \end{array}
  1789. as required.
  1790. \end{proof}
  1791. We now turn to the final lemma.
  1792. \begin{lemma}
  1793. Let $\A$ and $\B$ be closed monoidal categories, and $H:\A\to\B$ be a
  1794. monoidal functor.  Suppose that $\A$ has pullbacks.  Then the monoidal
  1795. category $1_\A\darrow H$ is closed.
  1796. \end{lemma}
  1797. \begin{proof}
  1798. Denote the natural transformation $HB_1 \otimes HB_2 \to H(B_1 \otimes
  1799. B_2)$ by $\gamma$.
  1800. Let $\<A_1,f_1, B_1>$ and $\<A_2,f_2, B_2>$  be two objects of $1 \darrow H$.
  1801. We show that
  1802. tensor product has a right adjoint by constructing an object universal from the
  1803. functor $\<A_1,f_1, B_1> \otimes -$ to $\<A_2,f_2, B_2>$.
  1804. Consider the pullback
  1805. %                           pi2
  1806. %           X -------------------------------> H[B1,B2]
  1807. %           | |                                |
  1808. %           |--                                | (He gamma)#
  1809. %           |                                  v
  1810. %       pi1 |                               [HB1, HB2]
  1811. %           |                                  |
  1812. %           |                                  | [f1, 1]
  1813. %           v              [1,f2]              v
  1814. %         [A1, A2] -----------------------> [A1, HB2]
  1815. \begin{center}\setlength{\unitlength}{1.1pt}\begin{picture}(200,100)
  1816. \put(80,90){$\pi_2$}
  1817. \put(15,80){$X$}\put(25,82){\vector(1,0){95}}\put(125,80){$H[B_1,B_2]$}
  1818. \put(10,40){$\pi_1$}\put(20,78){\vector(0,-1){65}}
  1819. \put(145,75){\vector(0,-1){26}}\put(150,60){$((H\epsilon)\gamma)^\sharp$}
  1820. \put(125,40){$[HB_1,HB_2]$}
  1821. \put(145,35){\vector(0,-1){26}}\put(150,20){$[f_1,1]$}
  1822. \put(70,10){$[1,f_2]$}
  1823. \put(0,0){$[A_1,A_2]$}\put(35,5){\vector(1,0){85}}\put(125,0){$[A_1,HB_2]$}
  1824. \end{picture}\end{center}
  1825. We will show that the top line of this diagram is the required universal
  1826. object.  Firstly, we claim that the universal arrow to $\<A_2,f_2,B_2>$ is
  1827. given by
  1828. %                f1*pi2                 gamma
  1829. %        A1 * X -------> HB1 * H[B1,B2]-------> H(B1 * [B1,B2])
  1830. %           |                                      |
  1831. %           |                                      |
  1832. %     pi1 b |                                      | He
  1833. %           |                                      |
  1834. %           v                f2                    v
  1835. %           A2 ---------------------------------> HB2
  1836. \begin{center}\setlength{\unitlength}{1.1pt}\begin{picture}(250,80)
  1837. \put(40,70){$f_1\otimes\pi_2$}\put(165,70){$\gamma$}
  1838. \put(0,60){$A_1\otimes X$}\put(40,62){\vector(1,0){30}}
  1839.     \put(75,60){$HB_1\otimes H[B_1,B_2]$}\put(155,62){\vector(1,0){30}}
  1840.     \put(190,60){$H(B_1 \otimes [B_1,B_2])$}
  1841. \put(0,30){$\pi_1^\flat$}\put(15,58){\vector(0,-1){45}}
  1842. \put(225,58){\vector(0,-1){45}}\put(230,30){$H\epsilon$}
  1843. \put(120,6){$f_2$}
  1844. \put(10,0){$A_2$}\put(25,3){\vector(1,0){190}}\put(215,0){$HB_2$}
  1845. \end{picture}\end{center}
  1846. To see that this square commutes, apply $\flat$ to both directions around
  1847. the pullback square.  It is immediate that $([1,f_2] \pi_1)^\flat$ equals
  1848. $(f_2\pi_1^\flat)$.  For the other direction, observe from standard
  1849. properties of adjunctions that $[f_1,1] = (\epsilon(f_1 \otimes 1))^\sharp$.
  1850. Hence, 
  1851. \begin{eqnarray*}
  1852. \lefteqn{ \bigl([f_1,1]((H\epsilon) \gamma)^\sharp \pi_2\bigr)^\flat}\\
  1853. &=& [f_1,1]^\flat (1\otimes ((H\epsilon)\gamma)^\sharp)(1\otimes \pi_2)\\
  1854. &=& \epsilon (1\otimes ((H\epsilon)\gamma)^\sharp)(f_1\otimes \pi_2)\\
  1855. &=& (H\epsilon) \gamma (f_1\otimes \pi_2),
  1856. \end{eqnarray*}
  1857. as required.
  1858. Suppose now that there exists a commuting square
  1859. %                f1*g              gamma
  1860. %        A1 * Y -------> HB1 * HC -------> H(B1 * C)
  1861. %           |                                   |
  1862. %           |                                   |
  1863. %         p |                                   | Hq
  1864. %           |                                   |
  1865. %           v                f2                 v
  1866. %           A2 ------------------------------> HB2
  1867. \begin{center}\setlength{\unitlength}{1.1pt}\begin{picture}(250,80)
  1868. \put(40,70){$f_1\otimes g$}\put(140,70){$\gamma$}
  1869. \put(0,60){$A_1\otimes Y$}\put(40,62){\vector(1,0){30}}
  1870.     \put(75,60){$HB_1\otimes HC$}\put(130,62){\vector(1,0){30}}
  1871.     \put(165,60){$H(B_1 \otimes C)$}
  1872. \put(0,30){$p$}\put(15,58){\vector(0,-1){45}}
  1873. \put(190,58){\vector(0,-1){45}}\put(195,30){$Hq$}
  1874. \put(90,6){$f_2$}
  1875. \put(10,0){$A_2$}\put(25,3){\vector(1,0){150}}\put(180,0){$HB_2$}
  1876. \end{picture}\end{center}
  1877. $\B$ is closed, so $q$ can be factored into 
  1878. $\epsilon(1\otimes q^\sharp)$.  By the naturality of
  1879. $\gamma$, $\bigl(H(1\otimes q^\sharp)\bigr) \gamma$ is equal to
  1880. $\gamma (1 \otimes Hq^\sharp)$, so we obtain
  1881.     f_2p = (H\epsilon)\gamma \bigl(f_1\otimes(Hq^\sharp) g\bigr).
  1882. Applying $\sharp$ to both sides of this equation shows that the following
  1883. square commutes.
  1884. %                    g              Hq#
  1885. %           Y -------------> HC--------------> H[B1,B2]
  1886. %           |                                  |
  1887. %           |                                  | (f1*1)#
  1888. %           |                                  v
  1889. %         p#|                               [A1,HB1*H[B1,B2]]
  1890. %           |                                  |
  1891. %           |                                  | [1, (He) gamma]
  1892. %           v              [1,f2]              v
  1893. %         [A1, A2] -----------------------> [A1, HB2]
  1894. \begin{center}\setlength{\unitlength}{1.1pt}\begin{picture}(250,100)
  1895. \put(30,90){$g$}\put(85,90){$H(q^\sharp)$}
  1896. \put(15,80){$Y$}\put(25,82){\vector(1,0){25}}\put(55,80){$HC$}
  1897.     \put(70,82){\vector(1,0){35}}\put(110,80){$H[B_1,B_2]$}
  1898. \put(10,40){$p^\sharp$}\put(20,78){\vector(0,-1){65}}
  1899. \put(145,78){\vector(0,-1){26}}\put(150,60){$(f_1\otimes 1)^\sharp$}
  1900. \put(125,40){$[A_1,HB_1\otimes H[B_1,B_2]$}
  1901. \put(145,38){\vector(0,-1){26}}\put(150,20){$[1,(H\epsilon)\gamma]$}
  1902. \put(70,10){$[1,f_2]$}
  1903. \put(0,0){$[A_1,A_2]$}\put(30,5){\vector(1,0){90}}\put(125,0){$[A_1,HB_2]$}
  1904. \end{picture}\end{center}
  1905. Consider the right side of this square.  Observe that
  1906.     [1,(H\epsilon)\gamma](f_1\otimes 1)^\sharp
  1907.         = ((H\epsilon)\gamma(f_1 \otimes 1))^\sharp.
  1908. Now consider the right side of the pullback square
  1909. that defines $X$.
  1910. \begin{eqnarray*}
  1911. [f_1,1] ((H\epsilon)\gamma)^\sharp
  1912.     &=& (\epsilon(f_1\otimes 1))^\sharp ((H\epsilon)\gamma)^\sharp\\
  1913.     &=& (\epsilon(f_1\otimes 1)(1\otimes ((H\epsilon)\gamma)^\sharp))^\sharp\\
  1914.     &=& (\epsilon(1\otimes((H\epsilon)\gamma)^\sharp)(f_1\otimes 1))^\sharp\\
  1915.     &=& ((H\epsilon)\gamma(f_1\otimes 1))^\sharp
  1916. \end{eqnarray*}
  1917. So we know that the right arrow of this square is the same as the right
  1918. arrow of the pullback square defining $X$.  But then there must exist a
  1919. unique map $r:Y\to X$ such that $\pi_2 s = (Gq^\sharp) g$ and $\pi_1 s =
  1920. p^\sharp$.  The first equation is precisely the condition that
  1921. $\<s,q^\sharp>$ be a well-defined map from $\<Y,g,C>$ to
  1922. $\<X,\pi_2,[B_1,B_2]>$.  The second shows that $\<s,q^\sharp>$ factors the
  1923. original map $\<p,q>$ through the counit of the adjunction.  Uniqueness
  1924. follows from the unique factorization of $q$ through $\epsilon$ and
  1925. properties of pullbacks.
  1926. \end{proof}
  1927. A fine example related to this construction is provided by the
  1928. partially ordered multisets motivating this work.  A pomset
  1929. $p=\<P,\mu,\Sigma>$ is just a poset $P$, labeled by a function
  1930. $\mu:V(P)\to\Sigma$ for some set $\Sigma$.  This makes it an object of
  1931. $\Pom=\Pos\comma\Set$.  A morphism of pomsets
  1932. $f:\<P,\mu,\Sigma>\to\<P',\mu',\Sigma'>$ consists of a monotone event
  1933. map $f:P\to P'$ on the underlying posets together with an alphabet map
  1934. or {\it translation} $t:\Sigma\to\Sigma'$ from $\Sigma$ to $\Sigma'$,
  1935. such that $t\mu=\mu'f$ (i.e., the event map and translation are
  1936. consistent with respect to the labelings). We can view $\Pom$ as the
  1937. full subcategory of $\Prom = 2! \comma {\bf Set}$, the latter generalizing
  1938. the notion of pomsets by allowing $P$ to be a preorder.
  1939. %In this paper, since the construction that we emphasize is $\D
  1940. %\comma\E$, we are interested only in labels drawn from sets.
  1941. %When more elaborately structured label sources are needed, as for the
  1942. %category $\Pos\comma{\two}$ of order ideals, the comma must be taken
  1943. %over the appropriate common denominator, here \Pos\ (so that an order
  1944. %ideal is a triple $\<P,f,\two>$ for $f:P\to\two$ monotone).  Many of
  1945. %the principles developed in this paper transcend this choice of
  1946. %denominator; fixing it at \Set\ helps fix ideas.
  1947. \section{Abstract Specification of the Operations}
  1948. Having established the categorical framework for our abstract treatment
  1949. of time, we now define the operations of our algebras of behaviors.
  1950. The sense in which time is abstract is that a fixed category $\D$ of
  1951. spaces is assumed to be given as a parameter.  The definitions may
  1952. therefore refer to $\D$, but will not assume that $\D$ has any a priori
  1953. structure such as labels on points or a metric between points.  Each
  1954. choice of $\D$ determines an algebra of behaviors, really a class of
  1955. behaviors since we impose no cardinality bounds on the number of events
  1956. in a behavior, other than the requirement that the events of a behavior
  1957. form a set.
  1958. Most operations are of arity a small integer.  On occasion however,
  1959. e.g. when certain arguments are required to have the same domain or the
  1960. same codomain, the arity will be a graph, meaning that the arguments
  1961. will be organized as a functor from that graph.  For example if the
  1962. arity is the 3-vertex 2-edge graph of shape $<$ (two edges pointing to
  1963. the right) then the arguments are two morphisms with a common domain.
  1964. This is made uniform by regarding each integer arity $n$ as a discrete
  1965. (edge-less) graph with vertices 1 through $n$.
  1966. {\it Disjoint Concurrence,} {\tt dconcur}$(p,q)$, notation $p+q$.  The
  1967. {\it disjoint concurrence} of behaviors $p$ and $q$ performs both $p$
  1968. and $q$ {\it concurrently}, that is, unconstrained in time.  It is
  1969. defined as the coproduct $p+q$ in $\D$.
  1970. {\it Disjoint Concatenation,} {\tt dconcat}$(p,d,q)$, notation
  1971. $p;^dq$.  The {\it disjoint concatenation} of behaviors $p$ and $q$
  1972. {\it with delay} $d$ performs both $p$ and $q$ as in disjoint
  1973. concurrence, but in the order $p$, then a delay $d:I+I\to d_0$, then $q$.
  1974. It is defined by the pushout
  1975. $$\commdiag{
  1976.     (I+I)\otimes (p\times q)   & \rTo{\pi_p+\pi_q}{} & p+q      \cr
  1977.     \dTo{d\otimes 1}{}         &                    & \dTo{}{} \cr
  1978.     d_0\otimes (p\times q)     & \rTo{}{}           & p;^dq
  1979. where the top morphism is the sum $\pi_p+\pi_q:p\times q+p\times q\to
  1980. p+q$ of the two projections $\pi_p:p\times q\to p$ and $\pi_q:p\times
  1981. q\to q$ from $p\times q$, and $(I+I)\otimes r\cong I\otimes r+I\otimes
  1982. r\cong r+r$.
  1983. {\it Concurrence,} {\tt concur}$(p\to k\leftarrow q)$, notation
  1984. $p||_kq$, or $p||q$ when $k$ is supplied by context.  The {concurrence}
  1985. of behaviors $p$ and $q$ {\it over} $k$ performs both $p$ and $q$
  1986. concurrently, {\it coordinated by} $k$.  It is defined as the coproduct
  1987. of the morphisms $p\to k$ and $q\to k$ in $\D/k$, the comma or slice
  1988. category of morphisms to $k$ (``objects over'' $k$), itself a morphism
  1989. to $k$ and thus retaining the coordination.
  1990. {\it Concatenation,} {\tt concat}$((p,d,q)\to k)$, notation $p;^d_k
  1991. q$.  The {\it concatenation} of $p$ with $q$ performs both $p$ and $q$
  1992. concurrently, {\it coordinated by} $k$, but in the order $p$, then a
  1993. delay $d$, then $q$.  It is defined as for disjoint concatenation, with
  1994. the pushout formed in $\D/k$.
  1995. {\it Local disjoint concatenation,} {\tt ldconcat}$(d,p\to L\leftarrow
  1996. q)$, notation $p\lc^d_Lq$.  The {\it local disjoint concatenation} of
  1997. behaviors $p$ and $q$ with delay $d$ performs $p$ and $q$ concurrently
  1998. except that events of $p$ at a given location must be followed by a
  1999. delay $d:(I+I)\to d_0$ before performing events of $q$ at that location.
  2000. It is defined analogously to disjoint concatenation via the pushout
  2001. $$\commdiag{
  2002.     (I+I)\otimes(p\times_L q) & \rTo{(\pi_p+\pi_q)\circ L_=}{} & p+q \cr
  2003.     \dTo{d\otimes 1}{}        &                        & \dTo{}{} \cr
  2004.     d_0\otimes(p\times_L q)   & \rTo{}{}               & p\lc^d_Lq
  2005. where $L_=:p\times_L q\to p\times q$ is the standard embedding, namely
  2006. the equalizer $L_p\circ\pi_p$ and $L_q\circ\pi_q$, and the rest is as
  2007. for disjoint concatenation.
  2008. {\it Local concatenation,} $p\lc^d_{kL}q$, is the appropriate
  2009. combination of concatenation and local disjoint concatenation.
  2010. {\it Orthocurrence,} {\tt orthocur}$(p,q)$, notation $p\otimes q$.  The
  2011. {\it orthocurrence} of behaviors $p$ and $q$ consists of the flow of
  2012. $p$ and $q$ past each other.  It is defined as their tensor product
  2013. $p\otimes q$.
  2014. {\it Unit,} {\tt unit}, notation $I$.  The {\it unit} is a one-event
  2015. behavior that flows by unnoticed.  It is defined as the unit $I$ of
  2016. $\D$, being the unit for orthocurrence.
  2017. {\it Observation,} {\tt observe}$(q,r)$, notation $r^q$.  The {\it
  2018. observation} of behavior $q$ by behavior $r$ is the result of observing
  2019. every stage of every event of $q$, where the stages of an event of $q$
  2020. are defined as the events of $r$.  It is defined by the adjunction
  2021. $p\otimes q\to r\cong p\to r^q$, that is, ${-}^q$ is right adjoint to
  2022. ${-}\otimes q$.
  2023. {\it Product,} {\tt product}$(p,q)$, notation $p\times q$.  The {\it
  2024. product} of behaviors $p$ and $q$ consists of all pairs $(a,b)$ of
  2025. constituents $a$ of $p$ and $b$ of $q$, with all the structure of $p$
  2026. and $q$ preserved coordinatewise.  It is defined as their ordinary
  2027. (categorical) product $p\times q$.
  2028. {\it Local product,} {\tt lproduct}$(p\to L\leftarrow q)$, notation
  2029. $p\times_L q$.  The {\it local product} of behaviors $p$ and $q$
  2030. consists of all pairs $(a,b)$ such that $a$ and $b$ are $L$-colocated
  2031. (conceptually, at the same location $l\in L$).  It is defined as the
  2032. pullback
  2033. $$\commdiag{
  2034.         p\times_L q &   \rTo{}{}   &    q     \cr
  2035.           \dTo{}{}  &         & \dTo{}{} \cr
  2036.             p       &   \rTo{}{}   &    L
  2037. \section{The Kind Language KL}\label{sec:langs}
  2038. The kind language KL consists of terms naming certain kinds in $\SSM$.
  2039. A KL term is either a constant denoting one of the ground kinds
  2040. $\one,\two,\three,\three',$ $\R$, $\R\op$, and $\SR$, or a compound
  2041. term $\D!$ or $\D\rhd\E$ where $\D$ and $\E$ are KL terms.
  2042. We make each ground kind semiconcrete by setting its underlying set
  2043. functor $U$ to 0 at 0 and 1 elsewhere.  The one exception is $\one$,
  2044. where $U(0)=1$, since $0=1$ in $\one$.
  2045. Some terms in this language are neither useful nor well-behaved, for
  2046. example $\two\rhd\one!$, which denotes a category that is not closed.
  2047. A {\it safe} term is defined by induction to be either a ground term, a
  2048. term $\D!$ where $\D$ is safe, or a term $\D!\rhd\E$ where $\D$ and
  2049. $\E$ are safe.  We then take a KL {\it kind} to be the denotation in
  2050. $\SSM$ of a safe KL term.
  2051. %***** Check that the definition of cosmon includes the requirement
  2052. %that forgetful functors have left adjoints in all cases (not just
  2053. %base cases).
  2054. %\begin{proof}
  2055. %Base categories are complete by fiat.  If $\D$ is complete, so is $\D!$.
  2056. %If $\D$ and $\E$ are complete then $\D\rhd\E$ must be complete because
  2057. %$U_\E$ has a left adjoint and so preserves all limits.
  2058. %\end{proof}
  2059. \begin{theorem}\label{thm:safemeansclosed}
  2060. Every safe KL kind is closed and bicomplete.
  2061. \end{theorem}
  2062. \begin{proof} This follows by induction on the structure of terms of
  2063. KL.  For the base case, ground kinds are closed and cocomplete by
  2064. definition.  For compound safe terms the theorem follows by induction
  2065. from Theorems 7, 8, 9, and 11, Corollary 12, Theorem 13, and the fact
  2066. that the forgetful functors of the basic kinds and those constructed by
  2067. ! and $\comma$ have the necessary continuity properties and adjoints.
  2068. \end{proof}
  2069. KL kinds include $\one!$ = sets, $\one\comma\one!$ = pointed sets,
  2070. $\two!$ = preordered sets, $\one!\comma\one!$ = multisets,
  2071. $\two!\comma\one!$ = ordered multisets, $\one!!$ = categories, $\two!!$
  2072. = order-enriched categories, $\one!!!$ = 2-categories, $\three!$ =
  2073. causal spaces, $\three'!\comma\one!$ = prossets, and $\R\op!$ =
  2074. premetric spaces.  It should be straightforward to verify these
  2075. correspondences from what has been said thus far about the ground kinds
  2076. and the operations.
  2077. This language provides a succinct system of names for a usefully broad
  2078. range of categories of datatypes.  It suffices to name such a category
  2079. $\D$ to be assured of the presence of all operations definable by
  2080. universal constructions (limits, colimits, adjunctions, etc.) from the
  2081. monoidal category structure of $\D$.
  2082. \section{Conclusion}
  2083. \subsection{Directions For Further Work}
  2084. \def\Hom{\hbox{\rm Hom}}
  2085. We mention briefly some projects we have in mind.
  2086. {\it Working over $\Cat$.}  Our techniques would appear to extend
  2087. straightforwardly to monoidal 2-categories, where the forgetful
  2088. functors are not to $\Set$ but to $\Cat$.  This turns the labeling
  2089. function from the underlying set of a behavior to (the underlying set
  2090. of) an alphabet into a labeling {\it functor}.  Its functoriality can
  2091. be put to good use, as in conveniently naming the closed category of
  2092. order ideals.
  2093. {\it Extensions to KL.}  Currently, methods for specifying subkinds of
  2094. dynamic kinds are somewhat ad hoc, e.g., posets are acyclic
  2095. \two-categories.  It would be useful to have operators that would
  2096. produce subkinds for a wide variety of {\D}, such as a single approach
  2097. to producing partial orders (as opposed to preorders) and say symmetric
  2098. metric spaces.
  2099. It would also be useful to have operators for constructing new metrics.
  2100. Indeed the present supply of metrics has been constructed ad hoc.  Some
  2101. uniform way of constructing them would be useful.
  2102. Such operators would be additions to the kind language KL.  The only
  2103. operations we have admitted thus far to KL are ! and $\comma$.  We do
  2104. not however intend by any means that these be all.  To fit in with !
  2105. and $\comma$ however these operations would need similar continuity
  2106. properties.
  2107. {\it Stochastic delay.}  Another possible choice for {\D} is that of a
  2108. category of probability distributions.  In other words for each pair of
  2109. events $u,v$ we specify a probability density function $\rho_{uv}:{\bf
  2110. R}\to[0,1]$ for the associated delay.  Consecutive delays would be
  2111. combined using convolution
  2112. $$\rho_{uv}\otimes\rho_{vw}(y)=\int_{-\infty}^{\infty}\rho_{uv}(x)\rho_{vw}(y-x)dxdy$$
  2113. The main problems include finding a suitable ordering on
  2114. distributions and dealing with the fact that the various
  2115. distributions on delays are not independent.  There is also the
  2116. question of the proper treatment of distributions which are not well
  2117. behaved and continuous (e.g., the Dirac delta function).
  2118. \subsection{Summary}
  2119. We have described a model of concurrency consisting of two orthogonal
  2120. parts, one dealing with kinds of behaviors, the other with the
  2121. behaviors themselves.
  2122. Kinds are taken to be semiconcrete monoidal categories, objects of
  2123. $\SSM$.  A ``kind language'' KL is provided for naming a few basic
  2124. kinds and combining them with operations ! and $\comma$ to form
  2125. compound kinds.  The !  operation turns a metric into a category of
  2126. spaces with that metric.  The $\comma$ operation combines two kinds by
  2127. using one as a source of structures and the other as a source of
  2128. alphabets with which those structures may be labeled.  Kinds namable in
  2129. this way are called KL kinds.
  2130. Behaviors are taken to be objects of a given kind $\D$ an object of
  2131. $\SSM$.  A ``behavior language'' PSL is provided for naming basic
  2132. behaviors and combining them with a useful library of operations
  2133. suitable for concurrent programming. Although typical behaviors contain
  2134. much structure, including a metric and a labeling function, this is
  2135. {\it only} typical and not required.  In general nothing is assumed
  2136. about the ``internal'' structure of a behavior, which may well be just
  2137. a simple atomic value.  We are however given operations for assembling
  2138. behaviors to form larger behaviors, namely limits, colimits, and a
  2139. tensor product.  These operations belong to the language PSL.
  2140. PSL is thus a true algebra of behaviors.  Even though the PSL
  2141. operations are defined uniformly across the spectrum of KL kinds, their
  2142. action on complex KL kinds would appear to be as useful as if PSL had
  2143. been defined to operate explicitly on spaces with metrics and labeling
  2144. functions.  Yet the meaning of PSL is defined no differently for
  2145. ``atomic'' behaviors than for behaviors with complex structures.  Thus
  2146. PSL acts as an algebra of behaviors in assuming no structure within its
  2147. elements yet being able to recreate that internal structure ``from
  2148. outside.''
  2149. The division of labor between KL and PSL is completely orthogonal.
  2150. ``Motion'' via functors of $\SSM$, from which KL operations are drawn,
  2151. has no influence on the point sets of spaces and individual alphabets
  2152. making up any given object $\D$ of $\SSM$.  This independence finds its
  2153. expression in the identity $U=U'F$ relating underlying sets, which says
  2154. that underlying sets of points and functions between them pass through
  2155. $F$ completely unscathed.  Conversely, motion via functors of $\D$,
  2156. from which PSL operations are drawn, takes place relative to a fixed
  2157. $\D$ and hence has no influence on the metrics and alphabet kinds
  2158. making up $\SSM$.
  2159. That PSL operates on the ``individuals''---objects and arrows---of a
  2160. fixed $\D$ gives it the character of a first order language.  Since
  2161. formation of $\D$-functor spaces is an operation of PSL, the proper
  2162. analogy is with ZF as a first order theory, where sets of individuals
  2163. are also individuals.  That is, ZF and PSL are both ``internally
  2164. closed,'' both by virtue of working in a closed universe.
  2165. Unlike ZF however, which operates in the cartesian closed universe of
  2166. sets, PSL operates in a closed universe that is not presumed to be
  2167. cartesian closed, whence the need to distinguish between tensor product
  2168. $\otimes$ and ordinary product $\times$ in PSL.
  2169. This distinction arises in a natural and inevitable way from an
  2170. elementary and familiar observation: {\it the temporal accumulation
  2171. operator need not be product}.  That it is product (conjunction) in the
  2172. two-valued metric logic underlying ordered time is not a necessary
  2173. facet of the logic of time.
  2174. A recent noncartesian logic is Girard's linear logic \cite{Gir87}.
  2175. Like PSL, linear logic distinguishes ordinary and tensor product.  Like
  2176. Boolean logic but unlike PSL, Girard's linear logic is self-dual,
  2177. giving rise by de Morgan's law to two binary operations dual to the two
  2178. products.  This prompts the following question.
  2179. \begin{quotation}
  2180. {\em Why should self-duality survive the diverging of the two products?}
  2181. \end{quotation}
  2182. To bring the concepts of PSL together we have drawn heavily on some
  2183. basic techniques that have evolved in category theory within the past
  2184. three decades, most notably those of closed categories and enriched
  2185. categories.  These techniques in the dry context of a mathematics text
  2186. can seem dauntingly abstract.  But just as there are good and bad
  2187. cholesterols so it is with abstractions: the bad daunt and the good
  2188. clarify.  In adapting these techniques to computing practice we have
  2189. tried to leave the good abstractions intact, namely those that
  2190. simplified matters or seemed to bear on computation.
  2191. One defect of our account is that it has put relatively little emphasis
  2192. on the logical character of PSL.  The adjunctions and compositions
  2193. pervading our framework contain all the essential elements of a modern
  2194. logic, yet we have not made this logical character as explicit as we
  2195. might.  This may just be a reflection of the algebraic perspective
  2196. which nurtured this work.  We hope that the proper balance of algebra
  2197. and logic here will become clear in due course.
  2198. \section*{Acknowledgments}
  2199. We are indebted to F.W. Lawvere both for his paper \cite{Law}
  2200. clarifying the topic of enriched categories and for much helpful
  2201. advice.  We also appreciate the help we have received from the Sydney
  2202. Category Seminar, especially A.J. Power and R.F.C. Walters.  The paper
  2203. was typeset using D. Knuth's TeX, L. Lamport's LaTeX macros, and P.
  2204. Taylor's diagram macros.
  2205. \bibliographystyle{alpha}
  2206. \begin{thebibliography}{CCMP91}
  2207. \bibitem[AHU74]{AHU}
  2208. A.V. Aho, J.~E. Hopcroft, and J.D. Ullman.
  2209. \newblock {\em The Design and Analysis of Computer Algorithms}.
  2210. \newblock Addison-Wesley, Reading, Mass, 1974.
  2211. \bibitem[AM75]{AM}
  2212. M.~Arbib and E.~Manes.
  2213. \newblock {\em Arrows, Structures, and Functors: The Categorical Imperative}.
  2214. \newblock Academic Press, 1975.
  2215. \bibitem[BCSW83]{BCSW}
  2216. R.~Betti, A.~Carboni, R.~Street, and R.~Walters.
  2217. \newblock Variation through enrichment.
  2218. \newblock {\em J. Pure and Applied Algebra}, 29:109--127, 1983.
  2219. \bibitem[Bir37]{Birk37}
  2220. G.~Birkhoff.
  2221. \newblock An extended arithmetic.
  2222. \newblock {\em Duke Mathematical Journal}, 3(2), June 1937.
  2223. \bibitem[Bir42]{Birk42}
  2224. G.~Birkhoff.
  2225. \newblock Generalized arithmetic.
  2226. \newblock {\em Duke Mathematical Journal}, 9(2), June 1942.
  2227. \bibitem[CCMP91]{CCMP}
  2228. R.T Casley, R.F. Crew, J.~Meseguer, and V.R. Pratt.
  2229. \newblock Temporal structures.
  2230. \newblock {\em Math. Structures in Comp. Sci.}, 1(2):179--213, July 1991.
  2231. \bibitem[Con71]{Con}
  2232. J.H. Conway.
  2233. \newblock {\em Regular Algebra and Finite Machines}.
  2234. \newblock Chapman and Hall, London, 1971.
  2235. \bibitem[EK65]{EK66a}
  2236. Samuel Eilenberg and G.~Max Kelly.
  2237. \newblock Closed categories.
  2238. \newblock In S.~Eilenberg, D.~K. Harrison, S.~MacLane, and H.~R{\"o}hrl,
  2239.   editors, {\em Proceedings of the Conference on Categorical Algebra, La Jolla,
  2240.   1965}, pages 421--562. Springer-Verlag, 1965.
  2241. \bibitem[Flo62]{Flo62}
  2242. R.W. Floyd.
  2243. \newblock Algorithm 97: shortest path.
  2244. \newblock {\em Communications of the ACM}, 5(6):345, 1962.
  2245. \bibitem[Gai89]{Ga89}
  2246. H.~Gaifman.
  2247. \newblock Modeling concurrency by partial orders and nonlinear transition
  2248.   systems.
  2249. \newblock In {\em Proc. REX School/Workshop on Linear Time, Branching Time and
  2250.   Partial Order in Logics and Models for Concurrency}, pages 467--488,
  2251.   Noordwijkerhout, The Netherlands, 1989. Springer-Verlag.
  2252. \bibitem[Gir87]{Gir87}
  2253. J.-Y. Girard.
  2254. \newblock Linear logic.
  2255. \newblock {\em Theoretical Computer Science}, 50:1--102, 1987.
  2256. \bibitem[GP87]{GP}
  2257. H.~Gaifman and V.R. Pratt.
  2258. \newblock Partial order models of concurrency and the computation of functions.
  2259. \newblock In {\em Proc. 2nd Annual IEEE Symp. on Logic in Computer Science},
  2260.   pages 72--85, Ithaca, NY, June 1987.
  2261. \bibitem[Kel82]{Kel}
  2262. G.M. Kelly.
  2263. \newblock {\em Basic Concepts of Enriched Category Theory: London Math. Soc.
  2264.   Lecture Notes}.
  2265. \newblock 64. Cambridge University Press, 1982.
  2266. \bibitem[Koz80]{Koz80b}
  2267. D.~Kozen.
  2268. \newblock A representation theorem for models of *-free {PDL}.
  2269. \newblock In {\em Proc. 7th Colloq. on Automata, Languages, and Programming},
  2270.   pages 351--362, July 1980.
  2271. \bibitem[Koz81]{Koz81a}
  2272. D.~Kozen.
  2273. \newblock On induction vs. *-continuity.
  2274. \newblock In D.~Kozen, editor, {\em Proc. Workshop on Logics of Programs 1981,
  2275.   LNCS 131}, pages 167--176. Spring-Verlag, 1981.
  2276. \bibitem[Law73]{Law}
  2277. W.~Lawvere.
  2278. \newblock Metric spaces, generalized logic, and closed categories.
  2279. \newblock In {\em Rendiconti del Seminario Matematico e Fisico di Milano,
  2280.   XLIII}. Tipografia Fusi, Pavia, 1973.
  2281. \bibitem[Lew90]{Lew90}
  2282. H.~Lewis.
  2283. \newblock A logic of concrete time intervals.
  2284. \newblock In {\em Proc. 5th Annual IEEE Symp. on Logic in Computer Science},
  2285.   Philadelphia, July 1990.
  2286. \bibitem[Mac71]{Mac}
  2287. S.~Mac{ }Lane.
  2288. \newblock {\em Categories for the Working Mathematician}.
  2289. \newblock Springer-Verlag, 1971.
  2290. \bibitem[Pra84]{Pr84}
  2291. V.R. Pratt.
  2292. \newblock The pomset model of parallel processes: {Unifying} the temporal and
  2293.   the spatial.
  2294. \newblock In {\em Proc. CMU/SERC Workshop on Analysis of Concurrency, LNCS
  2295.   197}, pages 180--196, Pittsburgh, 1984. Springer-Verlag.
  2296. \bibitem[Pra86]{Pr86}
  2297. V.R. Pratt.
  2298. \newblock Modeling concurrency with partial orders.
  2299. \newblock {\em Int. J. of Parallel Programming}, 15(1):33--71, February 1986.
  2300. \bibitem[Pra89]{Pr89a}
  2301. V.R. Pratt.
  2302. \newblock Enriched categories and the {Floyd-Warshall} connection.
  2303. \newblock In {\em Proc. First International Conference on Algebraic Methodology
  2304.   and Software Technology}, pages 177--180, Iowa City, May 1989.
  2305. \bibitem[RF68]{RF}
  2306. P.~Robert and J.~Ferland.
  2307. \newblock G\'en\'eralisation de l'algorithme de {W}arshall.
  2308. \newblock {\em Revue francaise d'Informatique et de Recherche Operationnelle},
  2309.   2(7):13--25, 1968.
  2310. \bibitem[Roy59]{Roy59}
  2311. B.~Roy.
  2312. \newblock Transitivit\'e et connexit\'e.
  2313. \newblock {\em Comptes Rendues Acad. Sci.}, 249:216--218, 1959.
  2314. \bibitem[Tar85]{Tar85}
  2315. Andrzej Tarlecki.
  2316. \newblock Bits and pieces of the theory of institutions.
  2317. \newblock In {\em Category Theory and Computer Programming}, Lecture Notes in
  2318.   Computer Science~240, pages 334--363, Guildford, UK, 1985. Springer-Verlag.
  2319. \bibitem[Vic89]{Vic89}
  2320. S.~Vickers.
  2321. \newblock {\em Topology via Logic}.
  2322. \newblock Cambridge University Press, 1989.
  2323. \bibitem[War62]{War62}
  2324. S.~Warshall.
  2325. \newblock A theorem on {B}oolean matrices.
  2326. \newblock {\em Journal of the ACM}, 9(1):11--12, 1962.
  2327. \end{thebibliography}
  2328. \end{document}
  2329.